AudioCoreAudioTarget.h

Go to the documentation of this file.
00001 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
00002 
00003 /*
00004     Sonic Visualiser
00005     An audio file viewer and annotation editor.
00006     Centre for Digital Music, Queen Mary, University of London.
00007     This file copyright 2006 Chris Cannam.
00008     
00009     This program is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU General Public License as
00011     published by the Free Software Foundation; either version 2 of the
00012     License, or (at your option) any later version.  See the file
00013     COPYING included with this distribution for more information.
00014 */
00015 
00016 #ifndef _AUDIO_CORE_AUDIO_TARGET_H_
00017 #define _AUDIO_CORE_AUDIO_TARGET_H_
00018 
00019 #ifdef HAVE_COREAUDIO
00020 
00021 #include <jack/jack.h>
00022 #include <vector>
00023 
00024 #include <CoreAudio/CoreAudio.h>
00025 #include <CoreAudio/CoreAudioTypes.h>
00026 #include <AudioUnit/AUComponent.h>
00027 #include <AudioUnit/AudioUnitProperties.h>
00028 #include <AudioUnit/AudioUnitParameters.h>
00029 #include <AudioUnit/AudioOutputUnit.h>
00030 
00031 #include "AudioCallbackPlayTarget.h"
00032 
00033 class AudioCallbackPlaySource;
00034 
00035 class AudioCoreAudioTarget : public AudioCallbackPlayTarget
00036 {
00037     Q_OBJECT
00038 
00039 public:
00040     AudioCoreAudioTarget(AudioCallbackPlaySource *source);
00041     ~AudioCoreAudioTarget();
00042 
00043     virtual bool isOK() const;
00044 
00045 public slots:
00046     virtual void sourceModelReplaced();
00047 
00048 protected:
00049     OSStatus process(void *data,
00050                      AudioUnitRenderActionFlags *flags,
00051                      const AudioTimeStamp *timestamp,
00052                      unsigned int inbus,
00053                      unsigned int inframes,
00054                      AudioBufferList *ioData);
00055 
00056     int m_bufferSize;
00057     int m_sampleRate;
00058     int m_latency;
00059 };
00060 
00061 #endif /* HAVE_COREAUDIO */
00062 
00063 #endif
00064 

Generated on Wed Feb 20 15:45:24 2008 for SonicVisualiser by  doxygen 1.5.1