diff audioio/AudioPortAudioTarget.h @ 92:52409ab73526

* Add support for PortAudio v19 * Add ladspa.cat file to provide categories if unavailable through LRDF
author Chris Cannam
date Thu, 25 Jan 2007 12:02:44 +0000
parents cd5d7ff8ef38
children
line wrap: on
line diff
--- a/audioio/AudioPortAudioTarget.h	Fri Jan 19 14:38:57 2007 +0000
+++ b/audioio/AudioPortAudioTarget.h	Thu Jan 25 12:02:44 2007 +0000
@@ -18,6 +18,10 @@
 
 #ifdef HAVE_PORTAUDIO
 
+// This code can be compiled for either PortAudio v18 or v19.
+// PortAudio v19 is the default.  If you want to use v18, define
+// the preprocessor symbol HAVE_PORTAUDIO_v18.
+
 #include <portaudio.h>
 #include <vector>
 
@@ -39,6 +43,8 @@
     virtual void sourceModelReplaced();
 
 protected:
+#ifdef HAVE_PORTAUDIO_V18
+
     int process(void *input, void *output, unsigned long frames,
 		PaTimestamp outTime);
 
@@ -47,6 +53,20 @@
 
     PortAudioStream *m_stream;
 
+#else
+
+    int process(const void *input, void *output, unsigned long frames,
+                const PaStreamCallbackTimeInfo *timeInfo,
+                PaStreamCallbackFlags statusFlags);
+
+    static int processStatic(const void *, void *, unsigned long,
+                             const PaStreamCallbackTimeInfo *,
+                             PaStreamCallbackFlags, void *);
+
+    PaStream *m_stream;
+
+#endif
+
     int m_bufferSize;
     int m_sampleRate;
     int m_latency;