Mercurial > hg > svapp
comparison audioio/AudioJACKTarget.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_JACK_TARGET_H_ | |
11 #define _AUDIO_JACK_TARGET_H_ | |
12 | |
13 #ifdef HAVE_JACK | |
14 | |
15 #include <jack/jack.h> | |
16 #include <vector> | |
17 | |
18 #include "AudioCallbackPlayTarget.h" | |
19 | |
20 #include <QMutex> | |
21 | |
22 class AudioCallbackPlaySource; | |
23 | |
24 class AudioJACKTarget : public AudioCallbackPlayTarget | |
25 { | |
26 Q_OBJECT | |
27 | |
28 public: | |
29 AudioJACKTarget(AudioCallbackPlaySource *source); | |
30 virtual ~AudioJACKTarget(); | |
31 | |
32 virtual bool isOK() const; | |
33 | |
34 public slots: | |
35 virtual void sourceModelReplaced(); | |
36 | |
37 protected: | |
38 int process(jack_nframes_t nframes); | |
39 | |
40 static int processStatic(jack_nframes_t, void *); | |
41 | |
42 jack_client_t *m_client; | |
43 std::vector<jack_port_t *> m_outputs; | |
44 jack_nframes_t m_bufferSize; | |
45 jack_nframes_t m_sampleRate; | |
46 QMutex m_mutex; | |
47 }; | |
48 | |
49 #endif /* HAVE_JACK */ | |
50 | |
51 #endif | |
52 |