--- a/libs/hydrogen/src/IO/PortAudioDriver.h +++ b/libs/hydrogen/src/IO/PortAudioDriver.h @@ -28,6 +28,11 @@ #ifdef PORTAUDIO_SUPPORT + + +#define PortAudioStream PaStream +#define PaTimestamp PaTime + #include #include --- a/libs/hydrogen/src/IO/portaudio_driver.cpp +++ b/libs/hydrogen/src/IO/portaudio_driver.cpp @@ -10,10 +10,11 @@ { int portAudioCallback( - void *inputBuffer, + const void *inputBuffer, void *outputBuffer, unsigned long framesPerBuffer, - PaTimestamp outTime, + const PaStreamCallbackTimeInfo* timeInfo, + PaStreamCallbackFlags statusFlags, void *userData ) { @@ -66,9 +67,16 @@ m_pOut_L = new float[ m_nBufferSize ]; m_pOut_R = new float[ m_nBufferSize ]; - int err = Pa_Initialize(); - + PaError err = Pa_Initialize(); + typedef struct + { + float left_phase; + float right_phase; + } paTestData; + + + if ( err != paNoError ) { ERRORLOG( "Portaudio error in Pa_Initialize: " + QString( Pa_GetErrorText( err ) ) ); return 1; @@ -81,9 +89,9 @@ paFloat32, /* 32 bit floating point output */ m_nSampleRate, // sample rate m_nBufferSize, // frames per buffer - 0, // number of buffers, if zero then use default minimum + //0, // number of buffers, if zero then use default minimum portAudioCallback, /* specify our custom callback */ - this ); /* pass our data through to callback */ + (void*)this ); /* pass our data through to callback */ if ( err != paNoError ) {