diff --git a/AppController.m b/AppController.m index 6d20a7611..5e4a67d32 100644 --- a/AppController.m +++ b/AppController.m @@ -133,6 +133,7 @@ - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename { + DBLog(@"Adding path: %@", filename); if ([playlistController addPaths:[NSArray arrayWithObject:filename] sort:NO] != 1) return NO; @@ -141,6 +142,8 @@ - (void)application:(NSApplication *)theApplication openFiles:(NSArray *)filenames { + DBLog(@"Adding paths: %@", filenames); + [playlistController addPaths:filenames sort:YES]; [theApplication replyToOpenOrPrint:NSApplicationDelegateReplySuccess]; } diff --git a/Changelog b/Changelog index 07f7bfb86..8523d7281 100644 --- a/Changelog +++ b/Changelog @@ -1,10 +1,6 @@ -0.04.c +0.05 ---- -Fixed autopositioning of the volume slider. - -0.04.b ----- -Fixed crash when dragging/dropping files to the playlist. +Dragging to the dock icon now works in 10.3. 0.04 ---- @@ -14,6 +10,8 @@ Fixed version number, so autoupdate should work. Compiled with GCC3.3, which should hopefully fix issues with 10.3. (If it doesn't, contact me please) Now ignores case when dealing with file extensions. Added volume slider. +Fixed autopositioning of the volume slider. +Fixed crash when dragging/dropping files to the playlist. 0.0.3 ----- diff --git a/English.lproj/MainMenu.nib/info.nib b/English.lproj/MainMenu.nib/info.nib index dad8186b9..903636ac6 100644 --- a/English.lproj/MainMenu.nib/info.nib +++ b/English.lproj/MainMenu.nib/info.nib @@ -3,13 +3,15 @@ IBDocumentLocation - 288 118 356 240 0 0 1024 746 + 69 104 356 240 0 0 1024 746 IBEditorPositions 29 243 676 346 44 0 0 1024 746 463 356 394 312 249 0 0 1024 746 + 513 + 475 157 180 156 0 0 1024 746 IBFramework Version 439.0 @@ -20,7 +22,7 @@ IBOpenObjects 21 - 29 + 513 463 IBSystem Version diff --git a/English.lproj/MainMenu.nib/keyedobjects.nib b/English.lproj/MainMenu.nib/keyedobjects.nib index 50bc3cdf1..4fac7d3f4 100644 Binary files a/English.lproj/MainMenu.nib/keyedobjects.nib and b/English.lproj/MainMenu.nib/keyedobjects.nib differ diff --git a/Feedback/FeedbackController.m b/Feedback/FeedbackController.m index 4a450a83a..6129e94a6 100644 --- a/Feedback/FeedbackController.m +++ b/Feedback/FeedbackController.m @@ -23,7 +23,6 @@ - (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo { - DBLog(@"CONTEXT: %i", contextInfo); if (contextInfo == YES) { [feedbackWindow close]; diff --git a/Info.plist b/Info.plist index da7734d91..78865cae0 100644 --- a/Info.plist +++ b/Info.plist @@ -11,14 +11,14 @@ * - CFBundleTypeName - Folder + CFBundleTypeOSTypes + + **** + fold + disk + CFBundleTypeRole - Editor - LSTypeIsPackage - - NSPersistentStoreTypeKey - Binary + None CFBundleTypeExtensions @@ -29,6 +29,8 @@ CFBundleTypeName AIFF Audio File + CFBundleTypeRole + Viewer CFBundleTypeExtensions @@ -93,7 +95,7 @@ CFBundleSignature ???? CFBundleVersion - 0.04.1 + 0.05 NSAppleScriptEnabled YES NSMainNibFile diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index e3037117a..a2382c37c 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -60,14 +60,17 @@ manager = [NSFileManager defaultManager]; + DBLog(@"Checking if path is a directory: %@", path); if ([manager fileExistsAtPath:path isDirectory:&isDir] && isDir == YES) { + DBLog(@"path is directory"); int count; int j; NSArray *subpaths; count = 0; subpaths = [manager subpathsAtPath:path]; + DBLog(@"Subpaths: %@", subpaths); for (j = 0; j < [subpaths count]; j++) { NSString *filepath; @@ -82,6 +85,7 @@ else { // DBLog(@"Adding fiiiiile: %@", path); + DBLog(@"path is a file"); return [self insertFile:path atIndex:index]; } } @@ -100,6 +104,7 @@ count = 0; + DBLog(@"Sorting paths"); if (sort == YES) { sortedFiles = [paths sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)]; @@ -109,13 +114,14 @@ sortedFiles = paths; } + DBLog(@"Paths sorted: %@", sortedFiles); for(i=0; i < [sortedFiles count]; i++) { int j; NSString *f; f = [sortedFiles objectAtIndex:i]; -// DBLog(@"Adding file to index: %i", index+count); + DBLog(@"Inserting path"); j = [self insertPath:f atIndex:(index+count)]; // DBLog(@"Number added: %i", j); count+=j; @@ -181,15 +187,11 @@ NSArray *files = [[info draggingPasteboard] propertyListForType:NSFilenamesPboardType]; [self insertPaths:files atIndex:row sort:YES]; - DBLog(@"FILES ADDED"); - [self updateIndexesFromRow:row]; - DBLog(@"UPDATED THINGS"); + if (shuffle == YES) [self generateShuffleList]; - DBLog(@"ALL DONE"); - return YES; } diff --git a/Playlist/PlaylistEntry.m b/Playlist/PlaylistEntry.m index 44f289070..9e7e4396e 100644 --- a/Playlist/PlaylistEntry.m +++ b/Playlist/PlaylistEntry.m @@ -225,8 +225,6 @@ if (tag) { - DBLog(@"TAG: %i", tag); - char *pArtist, *pTitle, *pAlbum, *pGenre, *pComment; pArtist = taglib_tag_artist(tag); diff --git a/Sound.m b/Sound.m index 20dae2073..445cce040 100644 --- a/Sound.m +++ b/Sound.m @@ -59,8 +59,8 @@ static OSStatus Sound_ACInputProc(AudioConverterRef inAudioConverter, UInt32* io Sound *sound = (Sound *)inUserData; OSStatus err = noErr; - DBLog(@"Convert input proc"); - DBLog(@"Numpackets: %i %i", *ioNumberDataPackets, ioData->mNumberBuffers); +// DBLog(@"Convert input proc"); +// DBLog(@"Numpackets: %i %i", *ioNumberDataPackets, ioData->mNumberBuffers); int amountToWrite; int amountWritten; @@ -70,7 +70,7 @@ static OSStatus Sound_ACInputProc(AudioConverterRef inAudioConverter, UInt32* io sourceBuf = malloc(amountToWrite); sound->conversionBuffer = sourceBuf; - DBLog(@"Requesting: %i", amountToWrite); +// DBLog(@"Requesting: %i", amountToWrite); amountWritten = [sound->soundFile fillBuffer:sourceBuf ofSize:amountToWrite]; // DBLog(@"PACKET NUMBER RECEIVED: %i", *ioNumberDataPackets); @@ -79,7 +79,7 @@ static OSStatus Sound_ACInputProc(AudioConverterRef inAudioConverter, UInt32* io ioData->mBuffers[0].mNumberChannels = sound->sourceStreamFormat.mChannelsPerFrame; ioData->mNumberBuffers = 1; - DBLog(@"Input complete"); +// DBLog(@"Input complete"); return err; } @@ -144,7 +144,6 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc - (id)init { - DBLog(@"HEllo"); self = [super init]; if (self) { @@ -233,8 +232,6 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc [portMessage setMsgid:msgid]; - DBLog(@"Sending message (nodata): %i", msgid); - [portMessage sendBeforeDate:date]; [date release]; @@ -257,7 +254,6 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc NSDate *date = [[NSDate alloc] initWithTimeIntervalSinceNow:20.0];//give shit a little time to send, just in case...may come back to bite me [portMessage setMsgid:msgid]; - DBLog(@"Sending message: %i", msgid); NS_DURING [portMessage sendBeforeDate:date]; @@ -335,7 +331,6 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc newTime = [soundFile seekToTime:time]; if (newTime >= 0.0) { - DBLog(@"RESETTING"); [self resetBuffer]; pos = [self calculatePos:newTime]; @@ -637,9 +632,8 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc - (void)setPlaybackStatus:(int)s { playbackStatus = s; - DBLog(@"SENDING MESSAGE"); + [self sendPortMessage:kCogStatusUpdateMessage withData:&s ofSize:(sizeof(int))]; - DBLog(@"MESSAGE SENT"); } - (void)pause @@ -663,7 +657,6 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc - (void)stop { - DBLog(@"STOPPING 2"); [self stopAudioOutput]; DBLog(@"Audio output stopped"); [self resetBuffer]; @@ -673,16 +666,12 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc // DBLog(@"HERE? PORT CONFLICT...FUCK"); unsigned long pos = 0; - DBLog(@"STOPPED 0"); [self sendPortMessage:kCogPositionUpdateMessage withData:&pos ofSize:(sizeof(unsigned long))]; // DBLog(@"THIS IS UBER SHITE: %@", positionTimer); - - DBLog(@"STOPPED 1"); [self stopPositionTimer]; // DBLog(@"INVALIDATED"); - DBLog(@"STOPPED 2"); } - (void)playFile:(NSString *)filename @@ -767,7 +756,7 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc - (void)setVolume:(float)v { - DBLog(@"Setting volume to: %f", v); +// DBLog(@"Setting volume to: %f", v); //Get the current stream format of the output OSStatus err = AudioUnitSetParameter (outputUnit, kHALOutputParam_Volume, @@ -775,8 +764,6 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc 0, v * 0.01f, 0); - - DBLog(@"Error: %lu", err); } diff --git a/SoundController.m b/SoundController.m index ba78a83e4..81b3db808 100644 --- a/SoundController.m +++ b/SoundController.m @@ -203,8 +203,6 @@ DBLog(@"NIL ALT"); } - DBLog(@"Setting button: %@", name); - [playButton setImage:img]; [playButton setAlternateImage:alt]; } @@ -238,7 +236,6 @@ { unsigned int message = [portMessage msgid]; - DBLog(@"GOT SOME KINDA WONDERFUL: %i %i", message, kCogStatusUpdateMessage); if (message == kCogCheckinMessage) { @@ -329,7 +326,6 @@ } else if (message == kCogStatusUpdateMessage) { - DBLog(@"MESSAGE?"); NSArray* components = [portMessage components]; NSData *data = [components objectAtIndex:0]; @@ -343,13 +339,11 @@ { //Show play image [self changePlayButtonImage:@"play"]; - DBLog(@"PLAY PIC"); } else if (s == kCogStatusPlaying) { //Show pause [self changePlayButtonImage:@"pause"]; - DBLog(@"PAUSE PIC"); } } } diff --git a/SoundFile/AACFile.m b/SoundFile/AACFile.m index d7a6fb7fe..41fe3b046 100644 --- a/SoundFile/AACFile.m +++ b/SoundFile/AACFile.m @@ -34,10 +34,7 @@ NeAACDecSetConfiguration(hAac, conf); get_AAC_format(inFd, &info, &seekTable, &seekTableLength, 1); - DBLog(@"INFO TIME"); - DBLog(@"---------"); - DBLog(@"%i %i %i %i %i", info.bitrate, info.channels, info.length, info.sampling_rate, info.version); - DBLog(@""); + fseek(inFd, 0, SEEK_SET); inputAmount = fread(inputBuffer, 1, INPUT_BUFFER_SIZE, inFd); @@ -158,7 +155,7 @@ second = (int)(milliseconds/1000.0); i = (int)(((float)second/length)*seekTableLength); - DBLog(@"SEEKING TO: %i %i", seekTable, seekTableLength); + pos = seekTable[i]; fseek(inFd, pos, SEEK_SET); diff --git a/SoundFile/MonkeysFile.m b/SoundFile/MonkeysFile.m index 4ca3dee52..72fb025f8 100644 --- a/SoundFile/MonkeysFile.m +++ b/SoundFile/MonkeysFile.m @@ -28,7 +28,7 @@ channels = decompress->GetInfo(APE_INFO_CHANNELS); totalSize = decompress->GetInfo(APE_INFO_TOTAL_BLOCKS)*bitsPerSample/8*channels; - DBLog(@"APE OPENED: %i %i %i %i", frequency, bitsPerSample, channels, totalSize); + return YES; } diff --git a/SoundFile/ShnFile.m b/SoundFile/ShnFile.m index f0858a6f9..cf598615a 100644 --- a/SoundFile/ShnFile.m +++ b/SoundFile/ShnFile.m @@ -50,7 +50,6 @@ totalSize = (((double)(length)*frequency)/1000.0) * channels * (bitsPerSample/8); bitRate = (int)((double)totalSize/((double)length/1000.0)); - DBLog(@"Bitrate; %i", bitRate); return YES; } diff --git a/SoundFile/SoundFile.m b/SoundFile/SoundFile.m index 5d4ea73c5..5beb37556 100644 --- a/SoundFile/SoundFile.m +++ b/SoundFile/SoundFile.m @@ -66,8 +66,6 @@ { SoundFile *soundFile; - DBLog(@"FILENAME: %@", [filename pathExtension]); - if (([[filename pathExtension] caseInsensitiveCompare:@"wav"] == NSOrderedSame) || ([[filename pathExtension] caseInsensitiveCompare:@"aiff"] == NSOrderedSame) || ([[filename pathExtension] caseInsensitiveCompare:@"aif"] == NSOrderedSame)) { soundFile = [[WaveFile alloc] init]; diff --git a/SoundFile/WavPackFile.m b/SoundFile/WavPackFile.m index c05979def..eef27eab7 100644 --- a/SoundFile/WavPackFile.m +++ b/SoundFile/WavPackFile.m @@ -69,7 +69,7 @@ { int sample; sample = (frequency/2)*(milliseconds/1000.0); - DBLog(@"%lf %i", milliseconds, sample); + WavpackSeekSample(wpc, sample); return milliseconds; diff --git a/main.m b/main.m index e73c36c7e..76dde019b 100644 --- a/main.m +++ b/main.m @@ -10,5 +10,7 @@ int main(int argc, char *argv[]) { + srandom(time(NULL)); + return NSApplicationMain(argc, (const char **) argv); }