Remove non-jackdbus man pages
[jackdbus.git] / linux / iio / JackIIODriver.h
blobeadd6fe7a3912f23d82cfe2e5aab4a6da31f85bd
1 /*
2 Copyright (C) 2013 Matt Flax <flatmax@flatmax.org>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef JACKIIODRIVER_H
21 #define JACKIIODRIVER_H
23 #include "JackAudioDriver.h"
24 #include "JackThreadedDriver.h"
26 #include <IIO/IIOMMap.H>
28 namespace Jack {
30 /** The Linux Industrial IO (IIO) subsystem driver for Jack.
31 Currently this driver only supports capture.
33 class JackIIODriver : public JackAudioDriver {
35 public:
36 IIOMMap iio; ///< The actual IIO devices
37 Eigen::Array<unsigned short int, Eigen::Dynamic, Eigen::Dynamic> data; ///< When we grab a mmapped buffer, store it here.
39 /** Constructor
41 JackIIODriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table) : JackAudioDriver(name, alias, engine, table) {
44 /** Destructor
46 virtual ~JackIIODriver() {
49 virtual int Open(jack_nframes_t buffer_size,
50 jack_nframes_t samplerate,
51 bool capturing,
52 bool playing,
53 int inchannels,
54 int outchannels,
55 bool monitor,
56 const char* capture_driver_name,
57 const char* playback_driver_name,
58 jack_nframes_t capture_latency,
59 jack_nframes_t playback_latency);
61 virtual int Close();
63 virtual int Read(); ///< Read from the IIO sysetm and load the jack buffers
65 virtual int Write(); ///< Not implemented.
67 virtual int SetBufferSize(jack_nframes_t buffer_size) {
68 //cout<<"JackIIODriver::SetBufferSize("<<buffer_size<<")\n";
69 return JackAudioDriver::SetBufferSize(buffer_size);
73 } // end of Jack namespace
74 #endif // JACKIIODRIVER_H