Compare commits

..

No commits in common. "646531f8aea9376b70c2f9b8e59addfdbd614146" and "d553e5127701002b8f5f0195a39d4426a28ace72" have entirely different histories.

View file

@ -196,28 +196,18 @@
}
- (void)seekToTime:(double)time {
[output fadeOutBackground];
[output setVolume:volume];
[output seek:time];
[bufferChain seek:time];
CogStatus status = (CogStatus)currentPlaybackStatus;
BOOL paused = status == CogStatusPaused;
NSURL *url;
id userInfo;
NSDictionary *rgi;
@synchronized(chainQueue) {
url = [bufferChain streamURL];
userInfo = [bufferChain userInfo];
rgi = [bufferChain rgInfo];
}
if(paused) {
[self setPlaybackStatus:CogStatusPaused waitUntilDone:YES];
if(time > 0.0) {
[self updatePosition:userInfo];
}
} else {
[output fadeIn];
}
[self play:url withUserInfo:userInfo withRGInfo:rgi startPaused:(status == CogStatusPaused) andSeekTo:time andResumeInterval:YES];
}
- (void)setVolume:(double)v {
@ -704,7 +694,7 @@
while(atomic_load_explicit(&refCount, memory_order_relaxed) != 0) {
[semaphore signal]; // Gotta poke this periodically
if(mainThread)
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.01]];
[[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.001]];
else
usleep(500);
}