Mercurial > hg > vamp-live-host
view audioio/AudioJACKSource.h @ 0:a6020bf991cd
* Initial import of what may or may not become a simple live visual-response
host for causal Vamp plugins
author | cannam |
---|---|
date | Thu, 19 Oct 2006 16:53:48 +0000 |
parents | |
children |
line wrap: on
line source
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ #ifndef _AUDIO_JACK_SOURCE_H_ #define _AUDIO_JACK_SOURCE_H_ #ifdef HAVE_JACK #include <jack/jack.h> #include <vector> #include "AudioCallbackRecordSource.h" #include <QMutex> class AudioCallbackRecordTarget; class AudioJACKSource : public AudioCallbackRecordSource { public: AudioJACKSource(AudioCallbackRecordTarget *target); virtual ~AudioJACKSource(); virtual bool isOK() const; protected: int process(jack_nframes_t nframes); int xrun(); static int processStatic(jack_nframes_t, void *); static int xrunStatic(void *); jack_client_t *m_client; std::vector<jack_port_t *> m_inputs; jack_nframes_t m_bufferSize; jack_nframes_t m_sampleRate; QMutex m_mutex; }; #endif /* HAVE_JACK */ #endif