Chris@0: /* -*- c-basic-offset: 4 -*- vi:set ts=8 sts=4 sw=4: */ Chris@0: Chris@0: /* Chris@0: A waveform viewer and audio annotation editor. Chris@2: Chris Cannam, Queen Mary University of London, 2005-2006 Chris@0: Chris@0: This is experimental software. Not for distribution. Chris@0: */ Chris@0: Chris@0: #ifndef _AUDIO_CORE_AUDIO_TARGET_H_ Chris@0: #define _AUDIO_CORE_AUDIO_TARGET_H_ Chris@0: Chris@0: #ifdef HAVE_COREAUDIO Chris@0: Chris@0: #include Chris@0: #include Chris@0: Chris@0: #include Chris@0: #include Chris@0: #include Chris@0: #include Chris@0: #include Chris@0: #include Chris@0: Chris@0: #include "AudioCallbackPlayTarget.h" Chris@0: Chris@0: class AudioCallbackPlaySource; Chris@0: Chris@0: class AudioCoreAudioTarget : public AudioCallbackPlayTarget Chris@0: { Chris@0: Q_OBJECT Chris@0: Chris@0: public: Chris@0: AudioCoreAudioTarget(AudioCallbackPlaySource *source); Chris@0: ~AudioCoreAudioTarget(); Chris@0: Chris@0: virtual bool isOK() const; Chris@0: Chris@0: public slots: Chris@0: virtual void sourceModelReplaced(); Chris@0: Chris@0: protected: Chris@0: OSStatus process(void *data, Chris@0: AudioUnitRenderActionFlags *flags, Chris@0: const AudioTimeStamp *timestamp, Chris@0: unsigned int inbus, Chris@0: unsigned int inframes, Chris@0: AudioBufferList *ioData); Chris@0: Chris@0: int m_bufferSize; Chris@0: int m_sampleRate; Chris@0: int m_latency; Chris@0: }; Chris@0: Chris@0: #endif /* HAVE_COREAUDIO */ Chris@0: Chris@0: #endif Chris@0: