annotate audioio/AudioCoreAudioTarget.h @ 122:ab861544f998

* Comment out problematic test -- sincerequest_t always seemed to be zero when this line was reached, so the pointer was often getting stuck if you asked to play a loop that had been drawn to the left of the position the pointer was at when you then tried to play it
author Chris Cannam
date Fri, 06 Jun 2008 10:32:50 +0000
parents 3c5756fb6a68
children
rev   line source
Chris@43 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@43 2
Chris@43 3 /*
Chris@43 4 Sonic Visualiser
Chris@43 5 An audio file viewer and annotation editor.
Chris@43 6 Centre for Digital Music, Queen Mary, University of London.
Chris@43 7 This file copyright 2006 Chris Cannam.
Chris@43 8
Chris@43 9 This program is free software; you can redistribute it and/or
Chris@43 10 modify it under the terms of the GNU General Public License as
Chris@43 11 published by the Free Software Foundation; either version 2 of the
Chris@43 12 License, or (at your option) any later version. See the file
Chris@43 13 COPYING included with this distribution for more information.
Chris@43 14 */
Chris@43 15
Chris@43 16 #ifndef _AUDIO_CORE_AUDIO_TARGET_H_
Chris@43 17 #define _AUDIO_CORE_AUDIO_TARGET_H_
Chris@43 18
Chris@43 19 #ifdef HAVE_COREAUDIO
Chris@43 20
Chris@43 21 #include <jack/jack.h>
Chris@43 22 #include <vector>
Chris@43 23
Chris@43 24 #include <CoreAudio/CoreAudio.h>
Chris@43 25 #include <CoreAudio/CoreAudioTypes.h>
Chris@43 26 #include <AudioUnit/AUComponent.h>
Chris@43 27 #include <AudioUnit/AudioUnitProperties.h>
Chris@43 28 #include <AudioUnit/AudioUnitParameters.h>
Chris@43 29 #include <AudioUnit/AudioOutputUnit.h>
Chris@43 30
Chris@43 31 #include "AudioCallbackPlayTarget.h"
Chris@43 32
Chris@43 33 class AudioCallbackPlaySource;
Chris@43 34
Chris@43 35 class AudioCoreAudioTarget : public AudioCallbackPlayTarget
Chris@43 36 {
Chris@43 37 Q_OBJECT
Chris@43 38
Chris@43 39 public:
Chris@43 40 AudioCoreAudioTarget(AudioCallbackPlaySource *source);
Chris@43 41 ~AudioCoreAudioTarget();
Chris@43 42
Chris@43 43 virtual bool isOK() const;
Chris@43 44
Chris@43 45 public slots:
Chris@43 46 virtual void sourceModelReplaced();
Chris@43 47
Chris@43 48 protected:
Chris@43 49 OSStatus process(void *data,
Chris@43 50 AudioUnitRenderActionFlags *flags,
Chris@43 51 const AudioTimeStamp *timestamp,
Chris@43 52 unsigned int inbus,
Chris@43 53 unsigned int inframes,
Chris@43 54 AudioBufferList *ioData);
Chris@43 55
Chris@43 56 int m_bufferSize;
Chris@43 57 int m_sampleRate;
Chris@43 58 int m_latency;
Chris@43 59 };
Chris@43 60
Chris@43 61 #endif /* HAVE_COREAUDIO */
Chris@43 62
Chris@43 63 #endif
Chris@43 64