comparison audioio/AudioPortAudioTarget.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 52409ab73526
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_PORT_AUDIO_TARGET_H_
17 #define _AUDIO_PORT_AUDIO_TARGET_H_
18
19 #ifdef HAVE_PORTAUDIO
20
21 #include <portaudio.h>
22 #include <vector>
23
24 #include "AudioCallbackPlayTarget.h"
25
26 class AudioCallbackPlaySource;
27
28 class AudioPortAudioTarget : public AudioCallbackPlayTarget
29 {
30 Q_OBJECT
31
32 public:
33 AudioPortAudioTarget(AudioCallbackPlaySource *source);
34 virtual ~AudioPortAudioTarget();
35
36 virtual bool isOK() const;
37
38 public slots:
39 virtual void sourceModelReplaced();
40
41 protected:
42 int process(void *input, void *output, unsigned long frames,
43 PaTimestamp outTime);
44
45 static int processStatic(void *, void *, unsigned long,
46 PaTimestamp, void *);
47
48 PortAudioStream *m_stream;
49
50 int m_bufferSize;
51 int m_sampleRate;
52 int m_latency;
53 };
54
55 #endif /* HAVE_PORTAUDIO */
56
57 #endif
58