Made stop update synchronous since there were issues when moving on to the next song.

CQTexperiment
vspader 2008-02-22 03:46:04 +00:00
parent 304ddffbd1
commit 3ab720427e
5 changed files with 2500 additions and 2493 deletions

View File

@ -182,7 +182,6 @@
if ([playlistController next] == NO)
return;
[self stop:self];
[self playEntry:[playlistController currentEntry]];
}
@ -191,7 +190,6 @@
if ([playlistController prev] == NO)
return;
[self stop:self];
[self playEntry:[playlistController currentEntry]];
}
@ -559,9 +557,12 @@
}
if (status == kCogStatusStopped) {
NSLog(@"DONE!");
[playlistController setCurrentEntry:nil];
}
else {
NSLog(@"PLAYING!");
}
playbackStatus = status;
}

View File

@ -63,6 +63,7 @@
- (BufferChain *) bufferChain;
- (id)initWithDelegate:(id)d;
- (void)setPlaybackStatus:(int)status waitUntilDone:(BOOL)wait;
- (void)setPlaybackStatus:(int)s;
- (void)requestNextStream:(id)userInfo;

View File

@ -107,21 +107,21 @@
{
//Set shouldoContinue to NO on allll things
[self setShouldContinue:NO];
[self setPlaybackStatus:kCogStatusStopped];
[self setPlaybackStatus:kCogStatusStopped waitUntilDone:YES];
}
- (void)pause
{
[output pause];
[self setPlaybackStatus:kCogStatusPaused];
[self setPlaybackStatus:kCogStatusPaused waitUntilDone:YES];
}
- (void)resume
{
[output resume];
[self setPlaybackStatus:kCogStatusPlaying];
[self setPlaybackStatus:kCogStatusPlaying waitUntilDone:YES];
}
- (void)seekToTime:(double)time
@ -307,9 +307,14 @@
[invocation invokeWithTarget:delegate];
}
- (void)setPlaybackStatus:(int)status waitUntilDone:(BOOL)wait
{
[self sendDelegateMethod:@selector(audioPlayer:statusChanged:) withObject:[NSNumber numberWithInt:status] waitUntilDone:wait];
}
- (void)setPlaybackStatus:(int)status
{
[self sendDelegateMethod:@selector(audioPlayer:statusChanged:) withObject:[NSNumber numberWithInt:status] waitUntilDone:NO];
[self setPlaybackStatus:status waitUntilDone:NO];
}
- (BufferChain *)bufferChain

File diff suppressed because it is too large Load Diff

View File

@ -431,7 +431,7 @@
if ([pe album] == nil)
i--;
else
i = [[[filtered objectAtIndex:0] index] intValue];
i = [(PlaylistEntry *)[[filtered objectAtIndex:0] index] intValue];
}
}