diff --git a/AppController.h b/AppController.h index 5585282ef..c8d9193d3 100644 --- a/AppController.h +++ b/AppController.h @@ -18,6 +18,8 @@ IBOutlet NSButton *infoButton; IBOutlet NSButton *shuffleButton; IBOutlet NSButton *repeatButton; + + IBOutlet NSDrawer *infoDrawer; } - (IBAction)addFiles:(id)sender; @@ -28,6 +30,12 @@ - (void)openPanelDidEnd:(NSOpenPanel *)panel returnCode:(int)returnCode contextInfo:(void *)contextInfo; +- (IBAction)donate:(id)sender; + +- (IBAction)toggleInfoDrawer:(id)sender; +- (void)drawerDidOpen:(NSNotification *)notification; +- (void)drawerDidClose:(NSNotification *)notification; + //Fun stuff - (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag; - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename; diff --git a/AppController.m b/AppController.m index 12e5a3b1a..0f654b222 100644 --- a/AppController.m +++ b/AppController.m @@ -150,4 +150,26 @@ [theApplication replyToOpenOrPrint:NSApplicationDelegateReplySuccess]; } +- (IBAction)toggleInfoDrawer:(id)sender +{ + [mainWindow makeKeyAndOrderFront:self]; + + [infoDrawer toggle:self]; +} + +- (void)drawerDidOpen:(NSNotification *)notification +{ + [infoButton setState:NSOnState]; +} + +- (void)drawerDidClose:(NSNotification *)notification +{ + [infoButton setState:NSOffState]; +} + +- (IBAction)donate:(id)sender +{ + [[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://sourceforge.net/project/project_donations.php?group_id=140003"]]; +} + @end diff --git a/Changelog b/Changelog index ea6921ff4..45d0ac53c 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,15 @@ -0.05 ----- +0.05 alpha 2 +------------ +Fixed dock menu connections, and menu connections for play/stop/next/prev. +Fixed bindings for tag/info drawer. +Volume settings are now consistent across songs. +Window remembers its location. +Info button now turns off when manually dragging the info drawer closed. +Fixed weirdness when displaying the info drawer after closing the window (via menu or keyboard shortcut). Performing Get info now makes the window visible. +Added a donation menu item. ($) + +0.05 alpha 1 +------------ Dragging to the dock icon now works in 10.3. Selection now selects the first song added when adding new files. Now seeds the random number generator for shuffle mode. @@ -12,6 +22,9 @@ Seekbar now updates the time field as you drag it, Simon Savary Window is now brought to the front when opening a playlist. Should work with 3rd party audio devices. +Gapless playback. +New core which should feature better performance. +New bugs and crashes! 0.04 ---- diff --git a/Credits.html b/Credits.html index 71afa4ef4..71d5575a3 100644 --- a/Credits.html +++ b/Credits.html @@ -1,5 +1,7 @@ - -Cog is dedicated to satan. Some guys just get a bad rap. + +Cog is dedicated to snacos, the ungodly combination of snacks and tacos. +

+This program has been made possible through donations from users like you. diff --git a/English.lproj/InfoPlist.strings b/English.lproj/InfoPlist.strings index 210807cd8..b1bd4c702 100644 Binary files a/English.lproj/InfoPlist.strings and b/English.lproj/InfoPlist.strings differ diff --git a/English.lproj/MainMenu.nib/classes.nib b/English.lproj/MainMenu.nib/classes.nib index c2d2fe599..3e7ff796e 100644 --- a/English.lproj/MainMenu.nib/classes.nib +++ b/English.lproj/MainMenu.nib/classes.nib @@ -4,16 +4,18 @@ ACTIONS = { addFiles = id; delEntries = id; + donate = id; loadPlaylist = id; savePlaylist = id; savePlaylistAs = id; - showInfo = id; + toggleInfoDrawer = id; }; CLASS = AppController; LANGUAGE = ObjC; OUTLETS = { addButton = NSButton; infoButton = NSButton; + infoDrawer = NSDrawer; mainWindow = NSPanel; nextButton = NSButton; playButton = NSButton; diff --git a/English.lproj/MainMenu.nib/info.nib b/English.lproj/MainMenu.nib/info.nib index 99e6dbc68..fda658cf4 100644 --- a/English.lproj/MainMenu.nib/info.nib +++ b/English.lproj/MainMenu.nib/info.nib @@ -3,15 +3,15 @@ IBDocumentLocation - 48 89 617 240 0 0 1024 746 + 91 411 617 240 0 0 1024 746 IBEditorPositions 29 - 243 676 346 44 0 0 1024 746 + 235 637 346 44 0 0 1024 746 463 336 385 352 268 0 0 1024 746 513 - 475 157 109 106 0 0 1024 746 + 85 528 109 106 0 0 1024 746 IBFramework Version 443.0 @@ -28,6 +28,7 @@ 3 IBOpenObjects + 513 463 29 21 diff --git a/English.lproj/MainMenu.nib/keyedobjects.nib b/English.lproj/MainMenu.nib/keyedobjects.nib index 895269de9..bd3dbe8f2 100644 Binary files a/English.lproj/MainMenu.nib/keyedobjects.nib and b/English.lproj/MainMenu.nib/keyedobjects.nib differ diff --git a/Info.plist b/Info.plist index 78865cae0..01ba218a9 100644 --- a/Info.plist +++ b/Info.plist @@ -87,7 +87,7 @@ CFBundleIconFile wheel CFBundleIdentifier - com.badahol.cog + com.vspader.cog CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType @@ -95,7 +95,7 @@ CFBundleSignature ???? CFBundleVersion - 0.05 + 0.05 alpha 1 NSAppleScriptEnabled YES NSMainNibFile diff --git a/PlaybackController.h b/PlaybackController.h index ce27aac0b..66bdaa18f 100644 --- a/PlaybackController.h +++ b/PlaybackController.h @@ -27,6 +27,8 @@ int playbackStatus; + float currentVolume; + BOOL showTimeRemaining; } diff --git a/PlaybackController.m b/PlaybackController.m index 1e828835b..3a410f051 100644 --- a/PlaybackController.m +++ b/PlaybackController.m @@ -22,13 +22,13 @@ - (void)awakeFromNib { - + currentVolume = 100.0; } - (IBAction)playPauseResume:(id)sender { - NSLog(@"PLAYING"); + DBLog(@"PLAYING"); if (playbackStatus == kCogStatusStopped) [self play:self]; else @@ -87,24 +87,25 @@ if (playbackStatus != kCogStatusStopped) [self stop:self]; - NSLog(@"LENGTH: %lf", [pe length]); + DBLog(@"LENGTH: %lf", [pe length]); [positionSlider setMaxValue:[pe length]]; [positionSlider setDoubleValue:0.0f]; [self updateTimeField:0.0f]; [soundController play:[pe filename]]; + [soundController setVolume:currentVolume]; } - (IBAction)next:(id)sender { - NSLog(@"CALLING: %i %i", playbackStatus, kCogStatusStopped); + DBLog(@"CALLING: %i %i", playbackStatus, kCogStatusStopped); if ([playlistController next] == NO) return; if (playbackStatus != kCogStatusStopped) { - NSLog(@"STOPPING"); + DBLog(@"STOPPING"); [self stop:self]; [self playEntry:[playlistController currentEntry]]; } @@ -112,7 +113,7 @@ - (IBAction)prev:(id)sender { - NSLog(@"CALLING"); + DBLog(@"CALLING"); if ([playlistController prev] == nil) return; @@ -129,7 +130,7 @@ double time; time = [positionSlider doubleValue]; -// if ([sender tracking] == NO) // check if user stopped sliding before playing audio + if ([sender tracking] == NO) // check if user stopped sliding before playing audio [soundController seekToTime:time]; [self updateTimeField:time]; @@ -156,8 +157,9 @@ - (IBAction)changeVolume:(id)sender { - float v = (float)[sender doubleValue]; - [soundController setVolume:v]; + currentVolume = (float)[sender doubleValue]; + + [soundController setVolume:currentVolume]; } @@ -193,7 +195,7 @@ [soundController setNextSong:nil]; else { - NSLog(@"NEXT SONG: %@", [pe filename]); + DBLog(@"NEXT SONG: %@", [pe filename]); [soundController setNextSong:[pe filename]]; } } @@ -233,7 +235,7 @@ int status = [s intValue]; if (status == kCogStatusStopped || status == kCogStatusPaused) { - NSLog(@"INVALIDATING"); + DBLog(@"INVALIDATING"); if (positionTimer) { [positionTimer invalidate]; diff --git a/Playlist/DNDArrayController.m b/Playlist/DNDArrayController.m index 7b9fd8d79..1bc74f3fb 100755 --- a/Playlist/DNDArrayController.m +++ b/Playlist/DNDArrayController.m @@ -121,7 +121,6 @@ NSString *MovedRowsType = @"MOVED_ROWS_TYPE"; - (NSIndexSet *)indexSetFromRows:(NSArray *)rows { - NSLog(@"HELLO"); NSMutableIndexSet *indexSet = [NSMutableIndexSet indexSet]; NSEnumerator *rowEnumerator = [rows objectEnumerator]; NSNumber *idx; diff --git a/Playlist/PlaylistController.m b/Playlist/PlaylistController.m index c20626e5b..e5a02f408 100644 --- a/Playlist/PlaylistController.m +++ b/Playlist/PlaylistController.m @@ -260,7 +260,6 @@ - (PlaylistEntry *)entryAtOffset:(int)offset { - NSLog(@"SHUFFLE: %i", offset); if (shuffle == YES) { int i = shuffleIndex; diff --git a/Playlist/PlaylistEntry.m b/Playlist/PlaylistEntry.m index 64875c9a3..f16dbef0e 100644 --- a/Playlist/PlaylistEntry.m +++ b/Playlist/PlaylistEntry.m @@ -219,11 +219,11 @@ -(void)readTags { TagLib_File *tagFile = taglib_file_new((const char *)[filename UTF8String]); - NSLog(@"Does it have a file? %i %s", tagFile, (const char *)[filename UTF8String]); + DBLog(@"Does it have a file? %i %s", tagFile, (const char *)[filename UTF8String]); if (tagFile) { TagLib_Tag *tag = taglib_file_tag(tagFile); - NSLog(@"Does it have a tag? %i", tag); + DBLog(@"Does it have a tag? %i", tag); if (tag) { diff --git a/README b/README index 31ba20304..16fed11a8 100644 --- a/README +++ b/README @@ -1,28 +1,10 @@ ---------------------------------------------------------------------------- -10.3 USERS!!! +Cog is released under the GPL. See COPYING for details. -If you are using 10.3.8 or below, I'd like to hear from you. I'm trying to -support all 10.3 systems, as I heard some people have had troubles with -10.3.9, and won't upgrade to it. -I can only fix this if people who actually run those systems wish to help -me debug Cog. Thanks! ---------------------------------------------------------------------------- +The libraries folder contains various decoding and tagging libraries, which i have created Xcode projects for, and possibly modified to make compile on OS X. The various libraries are under each of their own licenses. - Cog is released under the GPL. See COPYING for details. - - The libraries folder contains various decoding and tagging -libraries, which i have created Xcode projects for, and possibly modified -to make compile on OS X. The various libraries are under each of their own -licenses. - - Please note that vulgar language may be contained in the source code. -It is rated M for mature by the ESRB, the MPAA, and whatever else deems it -unsuitable for virgin ears. - - All Cog code is copyrighted by me, and is licensed under the GPL. +All Cog code is copyrighted by me, and is licensed under the GPL. - If you would like the photoshop sources for the various icons and -graphics, please send me an email, and I will be happy to get them to you. +If you would like the photoshop sources for the various icons and graphics, please send me an email, and I will be happy to get them to you. - Share and enjoy. +Share and enjoy. --Vincent Spader (vspader@users.sf.net) diff --git a/Sound/InputNode.m b/Sound/InputNode.m index d0249071f..f011d5850 100644 --- a/Sound/InputNode.m +++ b/Sound/InputNode.m @@ -42,7 +42,7 @@ if (amountRead <= 0) { endOfStream = YES; - NSLog(@"END OF INPUT WAS REACHED"); + DBLog(@"END OF INPUT WAS REACHED"); [controller endOfInputReached]; break; //eof } diff --git a/Sound/OutputCoreAudio.m b/Sound/OutputCoreAudio.m index bd6b05c66..942468154 100644 --- a/Sound/OutputCoreAudio.m +++ b/Sound/OutputCoreAudio.m @@ -33,7 +33,7 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc if ([output->outputController shouldContinue] == NO) { - NSLog(@"STOPPING"); + DBLog(@"STOPPING"); AudioOutputUnitStop(output->outputUnit); // [output stop]; @@ -58,7 +58,7 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc - (BOOL)setup { - NSLog(@"SETUP"); + DBLog(@"SETUP"); if (outputUnit) [self stop]; @@ -153,13 +153,13 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc - (void)start { - NSLog(@"START OUTPUT\n"); + DBLog(@"START OUTPUT\n"); AudioOutputUnitStart(outputUnit); } - (void)stop { - NSLog(@"STOP!"); + DBLog(@"STOP!"); if (outputUnit) { AudioOutputUnitStop(outputUnit); diff --git a/Sound/OutputNode.m b/Sound/OutputNode.m index fd00c76b5..d22dc0bdb 100644 --- a/Sound/OutputNode.m +++ b/Sound/OutputNode.m @@ -52,11 +52,11 @@ // NSLog(@"N: %i %i", n, endOfStream); if (endOfStream == YES) { - NSLog(@"End of stream reached: %i", endOfStream); + DBLog(@"End of stream reached: %i", endOfStream); amountPlayed = 0; [controller endOfInputPlayed]; //Updates shouldContinue appropriately? - NSLog(@"End of stream reached: %i", endOfStream); + DBLog(@"End of stream reached: %i", endOfStream); // return (n + [self readData:ptr amount:(amount-n)]); } diff --git a/Sound/SoundController.m b/Sound/SoundController.m index ab9da4635..b6a2ed162 100644 --- a/Sound/SoundController.m +++ b/Sound/SoundController.m @@ -127,7 +127,7 @@ { [delegate delegateRequestNextSong:[chainQueue count]]; - NSLog(@"END OF INPUT REACHED"); + DBLog(@"END OF INPUT REACHED"); if (nextSong == nil) return; @@ -149,7 +149,7 @@ if ([chainQueue count] <= 0) { //End of playlist - NSLog(@"STOPPED"); + DBLog(@"STOPPED"); [self stop]; return; @@ -157,7 +157,7 @@ // NSLog(@"SWAPPING BUFFERS"); [bufferChain release]; - NSLog(@"END OF INPUT PLAYED"); + DBLog(@"END OF INPUT PLAYED"); bufferChain = [chainQueue objectAtIndex:0]; [bufferChain retain]; diff --git a/Sound/SoundFile/VorbisFile.m b/Sound/SoundFile/VorbisFile.m index f09eb0374..996d68213 100644 --- a/Sound/SoundFile/VorbisFile.m +++ b/Sound/SoundFile/VorbisFile.m @@ -65,10 +65,6 @@ return total; } -- (void)dealloc -{ - NSLog(@"DEALLOCATING VORBIS"); -} - (void)close { ov_clear(&vorbisRef);