Mercurial > hg > svapp
comparison audioio/AudioPortAudioTarget.h @ 0:db6fcbd4405c
initial import
author | Chris Cannam |
---|---|
date | Tue, 10 Jan 2006 16:33:16 +0000 |
parents | |
children | df5923e33d01 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:db6fcbd4405c |
---|---|
1 /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 /* | |
4 A waveform viewer and audio annotation editor. | |
5 Chris Cannam, Queen Mary University of London, 2005 | |
6 | |
7 This is experimental software. Not for distribution. | |
8 */ | |
9 | |
10 #ifndef _AUDIO_PORT_AUDIO_TARGET_H_ | |
11 #define _AUDIO_PORT_AUDIO_TARGET_H_ | |
12 | |
13 #ifdef HAVE_PORTAUDIO | |
14 | |
15 #include <portaudio.h> | |
16 #include <vector> | |
17 | |
18 #include "AudioCallbackPlayTarget.h" | |
19 | |
20 class AudioCallbackPlaySource; | |
21 | |
22 class AudioPortAudioTarget : public AudioCallbackPlayTarget | |
23 { | |
24 Q_OBJECT | |
25 | |
26 public: | |
27 AudioPortAudioTarget(AudioCallbackPlaySource *source); | |
28 virtual ~AudioPortAudioTarget(); | |
29 | |
30 virtual bool isOK() const; | |
31 | |
32 public slots: | |
33 virtual void sourceModelReplaced(); | |
34 | |
35 protected: | |
36 int process(void *input, void *output, unsigned long frames, | |
37 PaTimestamp outTime); | |
38 | |
39 static int processStatic(void *, void *, unsigned long, | |
40 PaTimestamp, void *); | |
41 | |
42 PortAudioStream *m_stream; | |
43 | |
44 int m_bufferSize; | |
45 int m_sampleRate; | |
46 int m_latency; | |
47 }; | |
48 | |
49 #endif /* HAVE_PORTAUDIO */ | |
50 | |
51 #endif | |
52 |