Chris@19: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@0: Chris@0: /* Chris@21: Sonic Visualiser Chris@21: An audio file viewer and annotation editor. Chris@21: Centre for Digital Music, Queen Mary, University of London. Chris@21: This file copyright 2006 Chris Cannam. Chris@0: Chris@21: This program is free software; you can redistribute it and/or Chris@21: modify it under the terms of the GNU General Public License as Chris@21: published by the Free Software Foundation; either version 2 of the Chris@21: License, or (at your option) any later version. See the file Chris@21: COPYING included with this distribution for more information. Chris@0: */ Chris@0: Chris@0: #ifndef _AUDIO_PORT_AUDIO_TARGET_H_ Chris@0: #define _AUDIO_PORT_AUDIO_TARGET_H_ Chris@0: Chris@0: #ifdef HAVE_PORTAUDIO Chris@0: Chris@0: #include Chris@0: #include Chris@0: Chris@0: #include "AudioCallbackPlayTarget.h" Chris@0: Chris@0: class AudioCallbackPlaySource; Chris@0: Chris@0: class AudioPortAudioTarget : public AudioCallbackPlayTarget Chris@0: { Chris@0: Q_OBJECT Chris@0: Chris@0: public: Chris@0: AudioPortAudioTarget(AudioCallbackPlaySource *source); Chris@0: virtual ~AudioPortAudioTarget(); 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: int process(void *input, void *output, unsigned long frames, Chris@0: PaTimestamp outTime); Chris@0: Chris@0: static int processStatic(void *, void *, unsigned long, Chris@0: PaTimestamp, void *); Chris@0: Chris@0: PortAudioStream *m_stream; 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_PORTAUDIO */ Chris@0: Chris@0: #endif Chris@0: