Commit 8738a59a authored by sletz's avatar sletz
Browse files

Documentation for ringbuffer parameter in adapters.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3425 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 18dd612f
......@@ -154,7 +154,7 @@ namespace Jack
void JackAudioAdapterInterface::ResetRingBuffers()
{
if (fRingbufferSize == 0) {
fRingbufferCurSize *=2;
fRingbufferCurSize *= 2;
if (fRingbufferCurSize > DEFAULT_RB_SIZE)
fRingbufferCurSize = DEFAULT_RB_SIZE;
}
......@@ -209,7 +209,7 @@ namespace Jack
delete[] fPlaybackRingBuffer;
}
int JackAudioAdapterInterface::PushAndPull(float** inputBuffer, float** outputBuffer, unsigned int inNumberFrames)
int JackAudioAdapterInterface::PushAndPull(float** inputBuffer, float** outputBuffer, unsigned int frames)
{
bool failure = false;
fRunning = true;
......@@ -225,13 +225,13 @@ namespace Jack
// Push/pull from ringbuffer
for (int i = 0; i < fCaptureChannels; i++) {
fCaptureRingBuffer[i]->SetRatio(ratio);
if (fCaptureRingBuffer[i]->WriteResample(inputBuffer[i], inNumberFrames) < inNumberFrames)
if (fCaptureRingBuffer[i]->WriteResample(inputBuffer[i], frames) < frames)
failure = true;
}
for (int i = 0; i < fPlaybackChannels; i++) {
fPlaybackRingBuffer[i]->SetRatio(1/ratio);
if (fPlaybackRingBuffer[i]->ReadResample(outputBuffer[i], inNumberFrames) < inNumberFrames)
if (fPlaybackRingBuffer[i]->ReadResample(outputBuffer[i], frames) < frames)
failure = true;
}
......@@ -249,19 +249,19 @@ namespace Jack
}
}
int JackAudioAdapterInterface::PullAndPush(float** inputBuffer, float** outputBuffer, unsigned int inNumberFrames)
int JackAudioAdapterInterface::PullAndPush(float** inputBuffer, float** outputBuffer, unsigned int frames)
{
bool failure = false;
fPullAndPushTime = GetMicroSeconds();
// Push/pull from ringbuffer
for (int i = 0; i < fCaptureChannels; i++) {
if (fCaptureRingBuffer[i]->Read(inputBuffer[i], inNumberFrames) < inNumberFrames)
if (fCaptureRingBuffer[i]->Read(inputBuffer[i], frames) < frames)
failure = true;
}
for (int i = 0; i < fPlaybackChannels; i++) {
if (fPlaybackRingBuffer[i]->Write(outputBuffer[i], inNumberFrames) < inNumberFrames)
if (fPlaybackRingBuffer[i]->Write(outputBuffer[i], frames) < frames)
failure = true;
}
......
......@@ -473,7 +473,7 @@ extern "C"
desc->params[i].character = 'g';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.ui = 0;
strcpy(desc->params[i].short_desc, "Resampling ringbuffer size in frames (default = 16384)");
strcpy(desc->params[i].short_desc, "Resampling ringbuffer size in frames (default = 32768, 0 for automatic mode)");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
i++;
......
......@@ -1081,7 +1081,7 @@ extern "C"
desc->params[i].character = 'g';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.ui = 0;
strcpy(desc->params[i].short_desc, "Resampling ringbuffer size in frames (default = 16384)");
strcpy(desc->params[i].short_desc, "Resampling ringbuffer size in frames (default = 32768, 0 for automatic mode)");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
return desc;
......
......@@ -743,7 +743,7 @@ extern "C"
desc->params[i].character = 'g';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.ui = 0;
strcpy(desc->params[i].short_desc, "Resampling ringbuffer size in frames (default = 16384)");
strcpy(desc->params[i].short_desc, "Resampling ringbuffer size in frames (default = 32768, 0 for automatic mode)");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
return desc;
......
......@@ -299,7 +299,7 @@ extern "C"
desc->params[i].character = 'g';
desc->params[i].type = JackDriverParamInt;
desc->params[i].value.ui = 0;
strcpy(desc->params[i].short_desc, "Resampling ringbuffer size in frames (default = 16384)");
strcpy(desc->params[i].short_desc, "Resampling ringbuffer size in frames (default = 32768, 0 for automatic mode)");
strcpy(desc->params[i].long_desc, desc->params[i].short_desc);
return desc;
......
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