comparison audioio/AudioCoreAudioTarget.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
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_CORE_AUDIO_TARGET_H_
17 #define _AUDIO_CORE_AUDIO_TARGET_H_
18
19 #ifdef HAVE_COREAUDIO
20
21 #include <jack/jack.h>
22 #include <vector>
23
24 #include <CoreAudio/CoreAudio.h>
25 #include <CoreAudio/CoreAudioTypes.h>
26 #include <AudioUnit/AUComponent.h>
27 #include <AudioUnit/AudioUnitProperties.h>
28 #include <AudioUnit/AudioUnitParameters.h>
29 #include <AudioUnit/AudioOutputUnit.h>
30
31 #include "AudioCallbackPlayTarget.h"
32
33 class AudioCallbackPlaySource;
34
35 class AudioCoreAudioTarget : public AudioCallbackPlayTarget
36 {
37 Q_OBJECT
38
39 public:
40 AudioCoreAudioTarget(AudioCallbackPlaySource *source);
41 ~AudioCoreAudioTarget();
42
43 virtual bool isOK() const;
44
45 public slots:
46 virtual void sourceModelReplaced();
47
48 protected:
49 OSStatus process(void *data,
50 AudioUnitRenderActionFlags *flags,
51 const AudioTimeStamp *timestamp,
52 unsigned int inbus,
53 unsigned int inframes,
54 AudioBufferList *ioData);
55
56 int m_bufferSize;
57 int m_sampleRate;
58 int m_latency;
59 };
60
61 #endif /* HAVE_COREAUDIO */
62
63 #endif
64