Bug fixes: 1463532, 1463513

CQTexperiment
vspader 2006-04-04 01:08:21 +00:00
parent ee3c01aaed
commit 676b220430
20 changed files with 90 additions and 62 deletions

View File

@ -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;

View File

@ -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

View File

@ -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 <savary (at) ori
French translation courtesy of Simon Savary <savary (at) oricom.ca>
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
----

View File

@ -1,5 +1,7 @@
<html>
<body>
Cog is dedicated to satan. Some guys just get a bad rap.
<body style="text-align:center;">
Cog is dedicated to snacos, the ungodly combination of snacks and tacos.
<br /><br />
This program has been made possible through donations from users like you.
</body>
</html>

Binary file not shown.

View File

@ -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;

View File

@ -3,15 +3,15 @@
<plist version="1.0">
<dict>
<key>IBDocumentLocation</key>
<string>48 89 617 240 0 0 1024 746 </string>
<string>91 411 617 240 0 0 1024 746 </string>
<key>IBEditorPositions</key>
<dict>
<key>29</key>
<string>243 676 346 44 0 0 1024 746 </string>
<string>235 637 346 44 0 0 1024 746 </string>
<key>463</key>
<string>336 385 352 268 0 0 1024 746 </string>
<key>513</key>
<string>475 157 109 106 0 0 1024 746 </string>
<string>85 528 109 106 0 0 1024 746 </string>
</dict>
<key>IBFramework Version</key>
<string>443.0</string>
@ -28,6 +28,7 @@
<integer>3</integer>
<key>IBOpenObjects</key>
<array>
<integer>513</integer>
<integer>463</integer>
<integer>29</integer>
<integer>21</integer>

Binary file not shown.

View File

@ -87,7 +87,7 @@
<key>CFBundleIconFile</key>
<string>wheel</string>
<key>CFBundleIdentifier</key>
<string>com.badahol.cog</string>
<string>com.vspader.cog</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
@ -95,7 +95,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.05</string>
<string>0.05 alpha 1</string>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSMainNibFile</key>

View File

@ -27,6 +27,8 @@
int playbackStatus;
float currentVolume;
BOOL showTimeRemaining;
}

View File

@ -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];

View File

@ -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;

View File

@ -260,7 +260,6 @@
- (PlaylistEntry *)entryAtOffset:(int)offset
{
NSLog(@"SHUFFLE: %i", offset);
if (shuffle == YES)
{
int i = shuffleIndex;

View File

@ -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)
{

28
README
View File

@ -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.
All Cog code is copyrighted by me, and is licensed under the GPL.
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.
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.
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.
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)

View File

@ -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
}

View File

@ -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);

View File

@ -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)]);
}

View File

@ -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];

View File

@ -65,10 +65,6 @@
return total;
}
- (void)dealloc
{
NSLog(@"DEALLOCATING VORBIS");
}
- (void)close
{
ov_clear(&vorbisRef);