Mercurial > hg > sonic-visualiser
comparison audioio/AudioJACKTarget.h @ 0:cd5d7ff8ef38
* Reorganising code base. This revision will not compile.
author | Chris Cannam |
---|---|
date | Mon, 31 Jul 2006 12:03:45 +0000 |
parents | |
children | fbd7a497fd89 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cd5d7ff8ef38 |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 /* | |
4 Sonic Visualiser | |
5 An audio file viewer and annotation editor. | |
6 Centre for Digital Music, Queen Mary, University of London. | |
7 This file copyright 2006 Chris Cannam. | |
8 | |
9 This program is free software; you can redistribute it and/or | |
10 modify it under the terms of the GNU General Public License as | |
11 published by the Free Software Foundation; either version 2 of the | |
12 License, or (at your option) any later version. See the file | |
13 COPYING included with this distribution for more information. | |
14 */ | |
15 | |
16 #ifndef _AUDIO_JACK_TARGET_H_ | |
17 #define _AUDIO_JACK_TARGET_H_ | |
18 | |
19 #ifdef HAVE_JACK | |
20 | |
21 #include <jack/jack.h> | |
22 #include <vector> | |
23 | |
24 #include "AudioCallbackPlayTarget.h" | |
25 | |
26 #include <QMutex> | |
27 | |
28 class AudioCallbackPlaySource; | |
29 | |
30 class AudioJACKTarget : public AudioCallbackPlayTarget | |
31 { | |
32 Q_OBJECT | |
33 | |
34 public: | |
35 AudioJACKTarget(AudioCallbackPlaySource *source); | |
36 virtual ~AudioJACKTarget(); | |
37 | |
38 virtual bool isOK() const; | |
39 | |
40 public slots: | |
41 virtual void sourceModelReplaced(); | |
42 | |
43 protected: | |
44 int process(jack_nframes_t nframes); | |
45 | |
46 static int processStatic(jack_nframes_t, void *); | |
47 | |
48 jack_client_t *m_client; | |
49 std::vector<jack_port_t *> m_outputs; | |
50 jack_nframes_t m_bufferSize; | |
51 jack_nframes_t m_sampleRate; | |
52 QMutex m_mutex; | |
53 }; | |
54 | |
55 #endif /* HAVE_JACK */ | |
56 | |
57 #endif | |
58 |