Made stop update synchronous since there were issues when moving on to the next song.
This commit is contained in:
parent
304ddffbd1
commit
3ab720427e
5 changed files with 2500 additions and 2493 deletions
|
@ -182,7 +182,6 @@
|
||||||
if ([playlistController next] == NO)
|
if ([playlistController next] == NO)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
[self stop:self];
|
|
||||||
[self playEntry:[playlistController currentEntry]];
|
[self playEntry:[playlistController currentEntry]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +190,6 @@
|
||||||
if ([playlistController prev] == NO)
|
if ([playlistController prev] == NO)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
[self stop:self];
|
|
||||||
[self playEntry:[playlistController currentEntry]];
|
[self playEntry:[playlistController currentEntry]];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -559,9 +557,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status == kCogStatusStopped) {
|
if (status == kCogStatusStopped) {
|
||||||
|
NSLog(@"DONE!");
|
||||||
[playlistController setCurrentEntry:nil];
|
[playlistController setCurrentEntry:nil];
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
NSLog(@"PLAYING!");
|
||||||
|
}
|
||||||
|
|
||||||
playbackStatus = status;
|
playbackStatus = status;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,7 @@
|
||||||
- (BufferChain *) bufferChain;
|
- (BufferChain *) bufferChain;
|
||||||
- (id)initWithDelegate:(id)d;
|
- (id)initWithDelegate:(id)d;
|
||||||
|
|
||||||
|
- (void)setPlaybackStatus:(int)status waitUntilDone:(BOOL)wait;
|
||||||
- (void)setPlaybackStatus:(int)s;
|
- (void)setPlaybackStatus:(int)s;
|
||||||
|
|
||||||
- (void)requestNextStream:(id)userInfo;
|
- (void)requestNextStream:(id)userInfo;
|
||||||
|
|
|
@ -107,21 +107,21 @@
|
||||||
{
|
{
|
||||||
//Set shouldoContinue to NO on allll things
|
//Set shouldoContinue to NO on allll things
|
||||||
[self setShouldContinue:NO];
|
[self setShouldContinue:NO];
|
||||||
[self setPlaybackStatus:kCogStatusStopped];
|
[self setPlaybackStatus:kCogStatusStopped waitUntilDone:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)pause
|
- (void)pause
|
||||||
{
|
{
|
||||||
[output pause];
|
[output pause];
|
||||||
|
|
||||||
[self setPlaybackStatus:kCogStatusPaused];
|
[self setPlaybackStatus:kCogStatusPaused waitUntilDone:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)resume
|
- (void)resume
|
||||||
{
|
{
|
||||||
[output resume];
|
[output resume];
|
||||||
|
|
||||||
[self setPlaybackStatus:kCogStatusPlaying];
|
[self setPlaybackStatus:kCogStatusPlaying waitUntilDone:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)seekToTime:(double)time
|
- (void)seekToTime:(double)time
|
||||||
|
@ -307,9 +307,14 @@
|
||||||
[invocation invokeWithTarget:delegate];
|
[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
|
- (void)setPlaybackStatus:(int)status
|
||||||
{
|
{
|
||||||
[self sendDelegateMethod:@selector(audioPlayer:statusChanged:) withObject:[NSNumber numberWithInt:status] waitUntilDone:NO];
|
[self setPlaybackStatus:status waitUntilDone:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BufferChain *)bufferChain
|
- (BufferChain *)bufferChain
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -431,7 +431,7 @@
|
||||||
if ([pe album] == nil)
|
if ([pe album] == nil)
|
||||||
i--;
|
i--;
|
||||||
else
|
else
|
||||||
i = [[[filtered objectAtIndex:0] index] intValue];
|
i = [(PlaylistEntry *)[[filtered objectAtIndex:0] index] intValue];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue