Hopefully fix crashes from rapidly skipping files
Do this by serializing the background thread actions against the AudioPlayer object, so we don't start playback multiple times at once. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
cda6ce608c
commit
ca1f9381b5
1 changed files with 3 additions and 1 deletions
|
@ -57,7 +57,9 @@
|
|||
}
|
||||
|
||||
- (void)playBG:(NSURL *)url withUserInfo:(id)userInfo withRGInfo:(NSDictionary *)rgi startPaused:(NSNumber *)paused andSeekTo:(NSNumber *)time {
|
||||
[self play:url withUserInfo:userInfo withRGInfo:rgi startPaused:[paused boolValue] andSeekTo:[time doubleValue]];
|
||||
@synchronized (self) {
|
||||
[self play:url withUserInfo:userInfo withRGInfo:rgi startPaused:[paused boolValue] andSeekTo:[time doubleValue]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)play:(NSURL *)url withUserInfo:(id)userInfo withRGInfo:(NSDictionary *)rgi startPaused:(BOOL)paused andSeekTo:(double)time {
|
||||
|
|
Loading…
Reference in a new issue