Browse Source

Fix buffer size and sample rate handling in JackAlsaAdapter.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@3355 0c269be4-1314-0410-8aa9-9f06e86f4224
tags/1.9.2
sletz 16 years ago
parent
commit
1f1f74ebd7
8 changed files with 10 additions and 7 deletions
  1. +1
    -0
      ChangeLog
  2. +1
    -1
      common/JackAudioAdapterInterface.cpp
  3. +1
    -1
      common/JackAudioAdapterInterface.h
  4. +1
    -1
      common/JackNetAdapter.cpp
  5. +3
    -1
      linux/alsa/JackAlsaAdapter.cpp
  6. +1
    -1
      macosx/coreaudio/JackCoreAudioAdapter.cpp
  7. +1
    -1
      solaris/oss/JackOSSAdapter.cpp
  8. +1
    -1
      windows/portaudio/JackPortAudioAdapter.cpp

+ 1
- 0
ChangeLog View File

@@ -27,6 +27,7 @@ Michael Voigt
* Fix JackNetDriver::Close method.
* For audio device reservation, add card_to_num function.
* Fix buffer size and sample rate handling in JackAlsaAdapter.
2009-02-23 Stephane Letz <letz@grame.fr>


+ 1
- 1
common/JackAudioAdapterInterface.cpp View File

@@ -106,7 +106,7 @@ namespace Jack
fPlaybackRingBuffer[i]->Reset();
}

void JackAudioAdapterInterface::ResampleFactor ( jack_nframes_t& frame1, jack_nframes_t& frame2 )
void JackAudioAdapterInterface::ResampleFactor ( jack_time_t& frame1, jack_time_t& frame2 )
{
jack_time_t time = GetMicroSeconds();



+ 1
- 1
common/JackAudioAdapterInterface.h View File

@@ -184,7 +184,7 @@ namespace Jack
fHostDLL.IncFrame ( callback_usec );
}

void ResampleFactor ( jack_nframes_t& frame1, jack_nframes_t& frame2 );
void ResampleFactor ( jack_time_t& frame1, jack_time_t& frame2 );

void SetInputs ( int inputs )
{


+ 1
- 1
common/JackNetAdapter.cpp View File

@@ -367,7 +367,7 @@ namespace Jack
return SOCKET_ERROR;

//get the resample factor,
jack_nframes_t time1, time2;
jack_time_t time1, time2;
ResampleFactor ( time1, time2 );

//resample input data,


+ 3
- 1
linux/alsa/JackAlsaAdapter.cpp View File

@@ -66,9 +66,11 @@ namespace Jack
fAudioInterface.fCardName = strdup ( param->value.str );
break;
case 'r':
fAudioInterface.fFrequency = param->value.ui;
SetAdaptedSampleRate ( param->value.ui );
break;
case 'p':
fAudioInterface.fBuffering = param->value.ui;
SetAdaptedBufferSize ( param->value.ui );
break;
case 'q':
@@ -153,7 +155,7 @@ namespace Jack
bool failure = false;

//compute resampling factor
jack_nframes_t time1, time2;
jack_time_t time1, time2;
ResampleFactor ( time1, time2 );

//resample inputs


+ 1
- 1
macosx/coreaudio/JackCoreAudioAdapter.cpp View File

@@ -295,7 +295,7 @@ OSStatus JackCoreAudioAdapter::Render(void *inRefCon,
AudioUnitRender(adapter->fAUHAL, ioActionFlags, inTimeStamp, 1, inNumberFrames, adapter->fInputData);
bool failure = false;

jack_nframes_t time1, time2;
jack_time_t time1, time2;
adapter->ResampleFactor(time1, time2);

for (int i = 0; i < adapter->fCaptureChannels; i++) {


+ 1
- 1
solaris/oss/JackOSSAdapter.cpp View File

@@ -604,7 +604,7 @@ bool JackOSSAdapter::Execute()
return false;

bool failure = false;
jack_nframes_t time1, time2;
jack_time_t time1, time2;
ResampleFactor(time1, time2);
for (int i = 0; i < fCaptureChannels; i++) {


+ 1
- 1
windows/portaudio/JackPortAudioAdapter.cpp View File

@@ -38,7 +38,7 @@ namespace Jack
float** paBuffer;
bool failure = false;

jack_nframes_t time1, time2;
jack_time_t time1, time2;
adapter->ResampleFactor ( time1, time2 );

paBuffer = (float**)inputBuffer;


Loading…
Cancel
Save