Bug Fix: Stage seeking operation on main thread
This should not interact with the Audio Player object on a background thread, but instead the main thread queue. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
c02eabcf70
commit
7c169f9ef1
1 changed files with 4 additions and 4 deletions
|
@ -360,7 +360,7 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) {
|
|||
- (IBAction)seek:(id)sender {
|
||||
double time = [sender doubleValue];
|
||||
|
||||
[audioPlayer performSelectorInBackground:@selector(seekToTimeBG:) withObject:@(time)];
|
||||
[audioPlayer performSelectorOnMainThread:@selector(seekToTimeBG:) withObjects:@(time), nil];
|
||||
|
||||
lastPosition = -10;
|
||||
|
||||
|
@ -377,7 +377,7 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) {
|
|||
|
||||
lastPosition = -10;
|
||||
|
||||
[audioPlayer performSelectorInBackground:@selector(seekToTimeBG:) withObject:@(time)];
|
||||
[audioPlayer performSelectorOnMainThread:@selector(seekToTimeBG:) withObjects:@(time), nil];
|
||||
|
||||
[self setPosition:time];
|
||||
|
||||
|
@ -409,7 +409,7 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) {
|
|||
[self next:self];
|
||||
} else {
|
||||
lastPosition = -10;
|
||||
[audioPlayer performSelectorInBackground:@selector(seekToTimeBG:) withObject:@(seekTo)];
|
||||
[audioPlayer performSelectorOnMainThread:@selector(seekToTimeBG:) withObjects:@(seekTo), nil];
|
||||
[self setPosition:seekTo];
|
||||
}
|
||||
}
|
||||
|
@ -426,7 +426,7 @@ NSDictionary *makeRGInfo(PlaylistEntry *pe) {
|
|||
|
||||
lastPosition = -10;
|
||||
|
||||
[audioPlayer performSelectorInBackground:@selector(seekToTimeBG:) withObject:@(seekTo)];
|
||||
[audioPlayer performSelectorOnMainThread:@selector(seekToTimeBG:) withObjects:@(seekTo), nil];
|
||||
[self setPosition:seekTo];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue