Commit bbaefaee authored by sletz's avatar sletz
Browse files

Correct JackOSSAdapter thread scheduling, correct JackAudioAdapterInterface.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3430 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 1a609d57
......@@ -186,7 +186,7 @@ namespace Jack
fPlaybackRingBuffer = new JackResampler*[fPlaybackChannels];
if (fAdaptative) {
jack_info("Ringbuffer automatic adaptative mode");
jack_info("Ringbuffer automatic adaptative mode size = %d frames", fRingbufferCurSize);
} else {
fRingbufferCurSize = DEFAULT_RB_SIZE;
jack_info("Fixed ringbuffer size = %d frames", fRingbufferCurSize);
......
......@@ -144,20 +144,16 @@ namespace Jack
virtual int SetHostBufferSize ( jack_nframes_t buffer_size )
{
fHostBufferSize = buffer_size;
if (fAdaptative) {
if (fAdaptative)
AdaptRingBufferSize();
ResetRingBuffers();
}
return 0;
}
virtual int SetAdaptedBufferSize ( jack_nframes_t buffer_size )
{
fAdaptedBufferSize = buffer_size;
if (fAdaptative) {
if (fAdaptative)
AdaptRingBufferSize();
ResetRingBuffers();
}
return 0;
}
......
......@@ -104,7 +104,6 @@ namespace Jack
//turn the thread realtime
fThread.AcquireRealTime ( JackServerGlobals::fInstance->GetEngineControl()->fClientPriority );
return 0;
}
......
......@@ -494,9 +494,16 @@ int JackOSSAdapter::Open()
}
DisplayDeviceInfo();
//start adapter thread
if (fThread.StartSync() < 0) {
jack_error ( "Cannot start audioadapter thread" );
return -1;
}
//turn the thread realtime
fThread.AcquireRealTime(JackServerGlobals::fInstance->GetEngineControl()->fClientPriority);
return fThread.StartSync();
return 0;
error:
CloseAux();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment