A fix to try to stop the buffer from running dry when seeking.
parent
258d7aa077
commit
0f7f8f2750
|
@ -173,6 +173,11 @@
|
|||
if (outputLaunched == NO) {
|
||||
NSLog(@"Launching output thread!");
|
||||
[output launchThread];
|
||||
outputLaunched = YES;
|
||||
}
|
||||
else {
|
||||
NSLog(@"Resuming not launching");
|
||||
[output resume];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,16 +87,16 @@
|
|||
|
||||
- (void)seek:(double)time
|
||||
{
|
||||
NSLog(@"SEEKING IN BUFFERCHIAN");
|
||||
[inputNode seek:time];
|
||||
|
||||
[[inputNode readLock] lock];
|
||||
[[inputNode writeLock] lock];
|
||||
|
||||
//Signal so its waiting when we unlock
|
||||
[[inputNode semaphore] signal];
|
||||
|
||||
NSLog(@"Reset input buffer!");
|
||||
[inputNode resetBuffer];
|
||||
NSLog(@"Seeking in bufferchain!");
|
||||
[inputNode seek:time];
|
||||
|
||||
[[inputNode writeLock] unlock];
|
||||
[[inputNode readLock] unlock];
|
||||
|
@ -112,7 +112,6 @@
|
|||
[controller launchOutputThread];
|
||||
}
|
||||
|
||||
|
||||
- (id)finalNode
|
||||
{
|
||||
return finalNode;
|
||||
|
|
|
@ -130,9 +130,10 @@
|
|||
|
||||
- (void)seek:(double)time
|
||||
{
|
||||
NSLog(@"SEEKING WEEE");
|
||||
NSLog(@"SEEKING IN INPUTNODE");
|
||||
seekTime = time;
|
||||
shouldSeek = YES;
|
||||
initialBufferFilled = NO;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
- (void)seek:(double)time
|
||||
{
|
||||
[output pause];
|
||||
[semaphore signal];
|
||||
amountPlayed = time*format.mBytesPerFrame*(format.mSampleRate/1000.0);
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,6 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc
|
|||
{
|
||||
// Set the output device
|
||||
AudioDeviceID deviceID = outputDevice; //XXX use default if null
|
||||
NSLog(@"WEEE");
|
||||
NSLog(@"Using output device %d", deviceID);
|
||||
OSStatus err;
|
||||
|
||||
|
@ -253,11 +252,13 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc
|
|||
|
||||
- (void)pause
|
||||
{
|
||||
NSLog(@"PAUSE");
|
||||
AudioOutputUnitStop(outputUnit);
|
||||
}
|
||||
|
||||
- (void)resume
|
||||
{
|
||||
NSLog(@"RESUME");
|
||||
AudioOutputUnitStart(outputUnit);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version='1.0'>
|
||||
<dict>
|
||||
|
@ -95,7 +96,7 @@
|
|||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.06</string>
|
||||
<string>r428</string>
|
||||
<key>CFBundleHelpBookFolder</key>
|
||||
<string>Help</string>
|
||||
<key>CFBundleHelpBookName</key>
|
||||
|
@ -111,3 +112,4 @@
|
|||
<string>http://cogosx.sourceforge.net/appcast.xml</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
|
|
Loading…
Reference in New Issue