Hi Orcan,
I wrote a quick and dirty hack which compiles fine with portaudio19, but
i don't have portaudio installed
and can't test it today. So i'm a little bit pessimistic about the
quality of this patch :) Please try it and complain if it works not..
- Sebastian
Gabriel M. Beddingfield wrote:
Hi Orcan,
Thanks for the bug report!
On Mon, December 8, 2008 12:50 pm, Orcan Ogetbil wrote:
Hi,
I tried compiling the svn checkout (20081207) with portmidi=1 and
portaudio=1 flags. I compiled against the latest versions of both
[snip]
complicated error. I can probably learn the portaudio API and fix all
these myself, but I wanted to leave it to the original author (Do you guys
accept patches?).
AFAIK, nobody has been actively maintaining the portaudio drivers. I'll
try to look in to this... but most of the devs (including me) have been
pretty busy this fall... so patches are most certainly welcome. Send
them to this list (as an attachment).
Index: portaudio_driver.cpp
===================================================================
--- portaudio_driver.cpp (Revision 707)
+++ portaudio_driver.cpp (Arbeitskopie)
@@ -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,14 +67,24 @@
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;
}
+ static paTestData data;
+
+
err = Pa_OpenDefaultStream(
&m_pStream, /* passes back stream pointer */
0, /* no input channels */
@@ -81,9 +92,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 */
+ &data ); /* pass our data through to callback */
if ( err != paNoError ) {
Index: PortAudioDriver.h
===================================================================
--- PortAudioDriver.h (Revision 707)
+++ PortAudioDriver.h (Arbeitskopie)
@@ -28,6 +28,11 @@
#ifdef PORTAUDIO_SUPPORT
+
+
+#define PortAudioStream PaStream
+#define PaTimestamp PaTime
+
#include <inttypes.h>
#include <portaudio.h>
------------------------------------------------------------------------------
_______________________________________________
Hydrogen-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hydrogen-devel