Jack2  1.9.8
JackFFADODriver.h
1 /*
2 Copyright (C) 2001 Paul Davis
3 Copyright (C) 2004 Grame
4 Copyright (C) 2007 Pieter Palmers
5 
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 
20 */
21 
22 #ifndef __JackFFADODriver__
23 #define __JackFFADODriver__
24 
25 #include "JackAudioDriver.h"
26 #include "JackThreadedDriver.h"
27 #include "JackTime.h"
28 
29 #include "ffado_driver.h"
30 
31 namespace Jack
32 {
33 
39 {
40 
41  private:
42 
43  // enable verbose messages
44  int g_verbose;
45 
46  jack_driver_t* fDriver;
47  int ffado_driver_attach (ffado_driver_t *driver);
48  int ffado_driver_detach (ffado_driver_t *driver);
49  int ffado_driver_read (ffado_driver_t * driver, jack_nframes_t nframes);
50  int ffado_driver_write (ffado_driver_t * driver, jack_nframes_t nframes);
51  jack_nframes_t ffado_driver_wait (ffado_driver_t *driver,
52  int extra_fd, int *status,
53  float *delayed_usecs);
54  int ffado_driver_start (ffado_driver_t *driver);
55  int ffado_driver_stop (ffado_driver_t *driver);
56  int ffado_driver_restart (ffado_driver_t *driver);
57  ffado_driver_t *ffado_driver_new (const char *name, ffado_jack_settings_t *params);
58  void ffado_driver_delete (ffado_driver_t *driver);
59 
60  void jack_driver_init (jack_driver_t *driver);
61  void jack_driver_nt_init (jack_driver_nt_t * driver);
62 
63  public:
64 
65  JackFFADODriver(const char* name, const char* alias, JackLockedEngine* engine, JackSynchro* table)
66  : JackAudioDriver(name, alias,engine, table)
67  {}
68  virtual ~JackFFADODriver()
69  {}
70 
71  int Open(ffado_jack_settings_t *cmlparams);
72 
73  int Close();
74  int Attach();
75  int Detach();
76 
77  int Start();
78  int Stop();
79 
80  int Read();
81  int Write();
82 
83  int SetBufferSize(jack_nframes_t nframes);
84 };
85 
86 } // end of namespace
87 
88 #endif