2 Copyright (C) 2001 Paul Davis
3 Copyright (C) 2008 Romain Moret at Grame
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #ifndef __JackNetDriver__
22 #define __JackNetDriver__
24 #include "JackAudioDriver.h"
25 #include "JackNetInterface.h"
28 #include "JackFrameTimer.h"
34 \Brief This class describes the Net Backend
37 class JackNetDriver
: public JackAudioDriver
, public JackNetSlaveInterface
41 jack_port_id_t
* fMidiCapturePortList
;
42 jack_port_id_t
* fMidiPlaybackPortList
;
45 int fLastTransportState
;
46 int fLastTimebaseMaster
;
50 JackGnuPlotMonitor
<float>* fNetTimeMon
;
51 jack_time_t fRcvSyncUst
;
61 void EncodeTransportData();
62 void DecodeTransportData();
64 JackMidiBuffer
* GetMidiInputBuffer ( int port_index
);
65 JackMidiBuffer
* GetMidiOutputBuffer ( int port_index
);
68 JackNetDriver ( const char* name
, const char* alias
, JackLockedEngine
* engine
, JackSynchro
* table
,
69 const char* ip
, int port
, int mtu
, int midi_input_ports
, int midi_output_ports
,
70 char* net_name
, uint transport_sync
, char network_master_mode
);
73 int Open ( jack_nframes_t frames_per_cycle
, jack_nframes_t rate
, bool capturing
, bool playing
,
74 int inchannels
, int outchannels
, bool monitor
, const char* capture_driver_name
,
75 const char* playback_driver_name
, jack_nframes_t capture_latency
, jack_nframes_t playback_latency
);
84 // BufferSize can't be changed
85 bool IsFixedBufferSize()
90 int SetBufferSize ( jack_nframes_t buffer_size
)
95 int SetSampleRate ( jack_nframes_t sample_rate
)