Mercurial > hg > vamp-live-host
comparison audioio/AudioPortAudioSource.h @ 0:a6020bf991cd
* Initial import of what may or may not become a simple live visual-response
host for causal Vamp plugins
author | cannam |
---|---|
date | Thu, 19 Oct 2006 16:53:48 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:a6020bf991cd |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 #ifndef _AUDIO_PORT_AUDIO_SOURCE_H_ | |
4 #define _AUDIO_PORT_AUDIO_SOURCE_H_ | |
5 | |
6 #ifdef HAVE_PORTAUDIO | |
7 | |
8 #include <portaudio.h> | |
9 #include <vector> | |
10 | |
11 #include "AudioCallbackRecordSource.h" | |
12 | |
13 class AudioCallbackRecordTarget; | |
14 | |
15 class AudioPortAudioSource : public AudioCallbackRecordSource | |
16 { | |
17 public: | |
18 AudioPortAudioSource(AudioCallbackRecordTarget *source); | |
19 virtual ~AudioPortAudioSource(); | |
20 | |
21 virtual bool isOK() const; | |
22 | |
23 protected: | |
24 int process(void *input, void *output, unsigned long frames, | |
25 PaTimestamp outTime); | |
26 | |
27 static int processStatic(void *, void *, unsigned long, | |
28 PaTimestamp, void *); | |
29 | |
30 PortAudioStream *m_stream; | |
31 | |
32 int m_bufferSize; | |
33 int m_sampleRate; | |
34 int m_latency; | |
35 }; | |
36 | |
37 #endif /* HAVE_PORTAUDIO */ | |
38 | |
39 #endif | |
40 |