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