Fix for seeking bugs

CQTexperiment
vspader 2006-04-13 14:47:28 +00:00
parent b1ad4b00ae
commit 01a0259c44
3 changed files with 7 additions and 0 deletions

View File

@ -73,7 +73,9 @@
- (void)seek:(double)time - (void)seek:(double)time
{ {
NSLog(@"SEEKING IN BUFFERCHIAN");
[inputNode seek:time]; [inputNode seek:time];
[inputNode resetBuffer]; [inputNode resetBuffer];
[converterNode resetBuffer]; [converterNode resetBuffer];
} }

View File

@ -47,6 +47,7 @@
{ {
if (shouldSeek == YES) if (shouldSeek == YES)
{ {
NSLog(@"Actually seeking");
[soundFile seekToTime:seekTime]; [soundFile seekToTime:seekTime];
shouldSeek = NO; shouldSeek = NO;
} }
@ -68,6 +69,7 @@
- (void)seek:(double)time - (void)seek:(double)time
{ {
NSLog(@"SEEKING WEEE");
seekTime = time; seekTime = time;
shouldSeek = YES; shouldSeek = YES;
} }

View File

@ -43,7 +43,9 @@
if (availOutput == 0) if (availOutput == 0)
{ {
[writeLock unlock]; [writeLock unlock];
NSLog(@"WAITING %i", shouldContinue);
[semaphore wait]; [semaphore wait];
NSLog(@"NOT WAITING: %i", shouldContinue);
[writeLock lock]; [writeLock lock];
} }
else else
@ -153,6 +155,7 @@
- (void)resetBuffer - (void)resetBuffer
{ {
[semaphore signal];
[readLock lock]; [readLock lock];
[writeLock lock]; [writeLock lock];