Compare commits
No commits in common. "1601206b57915326e2db7340094a9509682ed54f" and "41780e88d0f60e480ce2c03a027b1218df13b532" have entirely different histories.
1601206b57
...
41780e88d0
1 changed files with 6 additions and 16 deletions
|
@ -196,28 +196,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)seekToTime:(double)time {
|
- (void)seekToTime:(double)time {
|
||||||
[output fadeOutBackground];
|
|
||||||
[output setVolume:volume];
|
|
||||||
|
|
||||||
[output seek:time];
|
|
||||||
[bufferChain seek:time];
|
|
||||||
|
|
||||||
CogStatus status = (CogStatus)currentPlaybackStatus;
|
CogStatus status = (CogStatus)currentPlaybackStatus;
|
||||||
BOOL paused = status == CogStatusPaused;
|
NSURL *url;
|
||||||
id userInfo;
|
id userInfo;
|
||||||
|
NSDictionary *rgi;
|
||||||
|
|
||||||
@synchronized(chainQueue) {
|
@synchronized(chainQueue) {
|
||||||
|
url = [bufferChain streamURL];
|
||||||
userInfo = [bufferChain userInfo];
|
userInfo = [bufferChain userInfo];
|
||||||
|
rgi = [bufferChain rgInfo];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(paused) {
|
[self play:url withUserInfo:userInfo withRGInfo:rgi startPaused:(status == CogStatusPaused) andSeekTo:time andResumeInterval:YES];
|
||||||
[self setPlaybackStatus:CogStatusPaused waitUntilDone:YES];
|
|
||||||
if(time > 0.0) {
|
|
||||||
[self updatePosition:userInfo];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
[output fadeIn];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setVolume:(double)v {
|
- (void)setVolume:(double)v {
|
||||||
|
@ -704,7 +694,7 @@
|
||||||
while(atomic_load_explicit(&refCount, memory_order_relaxed) != 0) {
|
while(atomic_load_explicit(&refCount, memory_order_relaxed) != 0) {
|
||||||
[semaphore signal]; // Gotta poke this periodically
|
[semaphore signal]; // Gotta poke this periodically
|
||||||
if(mainThread)
|
if(mainThread)
|
||||||
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.01]];
|
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.001]];
|
||||||
else
|
else
|
||||||
usleep(500);
|
usleep(500);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue