From 2dd1aeb937bf1bb9a30ed830b0d90f6134afa21a Mon Sep 17 00:00:00 2001 From: Slávek Banko Date: Wed, 18 Feb 2015 02:28:43 +0100 Subject: Initial import of akode 2.0.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- akode/plugins/jack_sink/jack_sink.h | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 akode/plugins/jack_sink/jack_sink.h (limited to 'akode/plugins/jack_sink/jack_sink.h') diff --git a/akode/plugins/jack_sink/jack_sink.h b/akode/plugins/jack_sink/jack_sink.h new file mode 100644 index 0000000..06fabef --- /dev/null +++ b/akode/plugins/jack_sink/jack_sink.h @@ -0,0 +1,60 @@ +/* aKode: JACK-Sink + + Copyright (C) 2004 Allan Sandfeld Jensen + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _AKODE_JACK_SINK_H +#define _AKODE_JACK_SINK_H + +#include "sink.h" + +#include "akode_export.h" + +namespace aKode { + +class AudioConfiguration; +class AudioFrame; + +class JACKSink : public Sink { +public: + JACKSink(); + ~JACKSink(); + bool open(); + int setAudioConfiguration(const AudioConfiguration *config); + const AudioConfiguration* audioConfiguration() const; + // Writes blocking + bool writeFrame(AudioFrame *frame); + + struct private_data; +private: + template void convertFrame(AudioFrame *in, AudioFrame *out); + private_data *m_data; +}; + +class JACKSinkPlugin : public SinkPlugin { +public: + virtual JACKSink* openSink() { + return new JACKSink(); + } +}; + +extern "C" AKODE_EXPORT JACKSinkPlugin jack_sink; + +} // namespace + +#endif -- cgit v1.2.3