File portaudio.patch of Package hydrogen

Index: libs/hydrogen/src/IO/PortAudioDriver.h
===================================================================
--- libs/hydrogen/src/IO/PortAudioDriver.h.orig	2008-02-05 03:00:25.000000000 +0200
+++ libs/hydrogen/src/IO/PortAudioDriver.h	2011-03-18 02:48:47.563442960 +0200
@@ -28,6 +28,11 @@
 
 #ifdef PORTAUDIO_SUPPORT
 
+
+
+#define PortAudioStream PaStream
+#define PaTimestamp PaTime
+
 #include <inttypes.h>
 #include <portaudio.h>
 
Index: libs/hydrogen/src/IO/portaudio_driver.cpp
===================================================================
--- libs/hydrogen/src/IO/portaudio_driver.cpp.orig	2009-07-15 14:24:37.000000000 +0200
+++ libs/hydrogen/src/IO/portaudio_driver.cpp	2011-03-18 02:48:47.564442900 +0200
@@ -10,10 +10,11 @@ namespace H2Core
 {
 
 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 @@ int PortAudioDriver::connect()
 	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 @@ int PortAudioDriver::connect()
 	          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 ) {
openSUSE Build Service is sponsored by