Jack2 1.9.8
|
00001 /* 00002 Copyright (C) 2001 Paul Davis 00003 Copyright (C) 2004 Grame 00004 Copyright (C) 2007 Pieter Palmers 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program; if not, write to the Free Software 00018 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 00020 */ 00021 00022 #ifndef __JackFFADODriver__ 00023 #define __JackFFADODriver__ 00024 00025 #include "JackAudioDriver.h" 00026 #include "JackThreadedDriver.h" 00027 #include "JackTime.h" 00028 00029 #include "ffado_driver.h" 00030 00031 namespace Jack 00032 { 00033 00038 class JackFFADODriver : public JackAudioDriver 00039 { 00040 00041 private: 00042 00043 // enable verbose messages 00044 int g_verbose; 00045 00046 jack_driver_t* fDriver; 00047 int ffado_driver_attach (ffado_driver_t *driver); 00048 int ffado_driver_detach (ffado_driver_t *driver); 00049 int ffado_driver_read (ffado_driver_t * driver, jack_nframes_t nframes); 00050 int ffado_driver_write (ffado_driver_t * driver, jack_nframes_t nframes); 00051 jack_nframes_t ffado_driver_wait (ffado_driver_t *driver, 00052 int extra_fd, int *status, 00053 float *delayed_usecs); 00054 int ffado_driver_start (ffado_driver_t *driver); 00055 int ffado_driver_stop (ffado_driver_t *driver); 00056 int ffado_driver_restart (ffado_driver_t *driver); 00057 ffado_driver_t *ffado_driver_new (const char *name, ffado_jack_settings_t *params); 00058 void ffado_driver_delete (ffado_driver_t *driver); 00059 00060 void jack_driver_init (jack_driver_t *driver); 00061 void jack_driver_nt_init (jack_driver_nt_t * driver); 00062 00063 public: 00064 00065 JackFFADODriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table) 00066 : JackAudioDriver(name, alias,engine, table) 00067 {} 00068 virtual ~JackFFADODriver() 00069 {} 00070 00071 int Open(ffado_jack_settings_t *cmlparams); 00072 00073 int Close(); 00074 int Attach(); 00075 int Detach(); 00076 00077 int Start(); 00078 int Stop(); 00079 00080 int Read(); 00081 int Write(); 00082 00083 int SetBufferSize(jack_nframes_t nframes); 00084 }; 00085 00086 } // end of namespace 00087 00088 #endif