Mercurial > hg > svapp
comparison audioio/AudioPortAudioTarget.h @ 114:ccdc5b30e54c
* Remove PAv18 support, change PORTAUDIO to PORTAUDIO_2_0 throughout as
this is what comes from PAv19's pkgconfig module name
author | Chris Cannam |
---|---|
date | Fri, 09 May 2008 15:39:42 +0000 |
parents | 9fc4b256c283 |
children | 5dcbda490794 |
comparison
equal
deleted
inserted
replaced
113:0c1ea5ff6518 | 114:ccdc5b30e54c |
---|---|
14 */ | 14 */ |
15 | 15 |
16 #ifndef _AUDIO_PORT_AUDIO_TARGET_H_ | 16 #ifndef _AUDIO_PORT_AUDIO_TARGET_H_ |
17 #define _AUDIO_PORT_AUDIO_TARGET_H_ | 17 #define _AUDIO_PORT_AUDIO_TARGET_H_ |
18 | 18 |
19 #ifdef HAVE_PORTAUDIO | 19 #ifdef HAVE_PORTAUDIO_2_0 |
20 | 20 |
21 // This code can be compiled for either PortAudio v18 or v19. | 21 // This code requires PortAudio v19 -- it won't work with v18. |
22 // PortAudio v19 is the default. If you want to use v18, define | |
23 // the preprocessor symbol HAVE_PORTAUDIO_v18. | |
24 | 22 |
25 #include <portaudio.h> | 23 #include <portaudio.h> |
26 #include <vector> | 24 #include <vector> |
25 | |
26 #include <QObject> | |
27 | 27 |
28 #include "AudioCallbackPlayTarget.h" | 28 #include "AudioCallbackPlayTarget.h" |
29 | 29 |
30 class AudioCallbackPlaySource; | 30 class AudioCallbackPlaySource; |
31 | 31 |
45 | 45 |
46 public slots: | 46 public slots: |
47 virtual void sourceModelReplaced(); | 47 virtual void sourceModelReplaced(); |
48 | 48 |
49 protected: | 49 protected: |
50 #ifdef HAVE_PORTAUDIO_V18 | |
51 | |
52 int process(void *input, void *output, unsigned long frames, | |
53 PaTimestamp outTime); | |
54 | |
55 static int processStatic(void *, void *, unsigned long, | |
56 PaTimestamp, void *); | |
57 | |
58 PortAudioStream *m_stream; | |
59 | |
60 #else | |
61 | |
62 int process(const void *input, void *output, unsigned long frames, | 50 int process(const void *input, void *output, unsigned long frames, |
63 const PaStreamCallbackTimeInfo *timeInfo, | 51 const PaStreamCallbackTimeInfo *timeInfo, |
64 PaStreamCallbackFlags statusFlags); | 52 PaStreamCallbackFlags statusFlags); |
65 | 53 |
66 static int processStatic(const void *, void *, unsigned long, | 54 static int processStatic(const void *, void *, unsigned long, |
67 const PaStreamCallbackTimeInfo *, | 55 const PaStreamCallbackTimeInfo *, |
68 PaStreamCallbackFlags, void *); | 56 PaStreamCallbackFlags, void *); |
69 | 57 |
70 PaStream *m_stream; | 58 PaStream *m_stream; |
71 | |
72 #endif | |
73 | 59 |
74 int m_bufferSize; | 60 int m_bufferSize; |
75 int m_sampleRate; | 61 int m_sampleRate; |
76 int m_latency; | 62 int m_latency; |
77 bool m_done; | 63 bool m_done; |