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"
26 #include "netjack_packet.h"
31 \Brief This class describes the Net Backend
34 class JackNetOneDriver
: public JackAudioDriver
37 netjack_driver_state_t netj
;
40 render_payload_to_jack_ports_float ( void *packet_payload
, jack_nframes_t net_period_down
, JSList
*capture_ports
, JSList
*capture_srcs
, jack_nframes_t nframes
, int dont_htonl_floats
);
42 render_jack_ports_to_payload_float (JSList
*playback_ports
, JSList
*playback_srcs
, jack_nframes_t nframes
, void *packet_payload
, jack_nframes_t net_period_up
, int dont_htonl_floats
);
45 render_payload_to_jack_ports_celt (void *packet_payload
, jack_nframes_t net_period_down
, JSList
*capture_ports
, JSList
*capture_srcs
, jack_nframes_t nframes
);
47 render_jack_ports_to_payload_celt (JSList
*playback_ports
, JSList
*playback_srcs
, jack_nframes_t nframes
, void *packet_payload
, jack_nframes_t net_period_up
);
50 render_payload_to_jack_ports (int bitdepth
, void *packet_payload
, jack_nframes_t net_period_down
, JSList
*capture_ports
, JSList
*capture_srcs
, jack_nframes_t nframes
, int dont_htonl_floats
);
52 render_jack_ports_to_payload (int bitdepth
, JSList
*playback_ports
, JSList
*playback_srcs
, jack_nframes_t nframes
, void *packet_payload
, jack_nframes_t net_period_up
, int dont_htonl_floats
);
55 JackNetOneDriver ( const char* name
, const char* alias
, JackLockedEngine
* engine
, JackSynchro
* table
,
56 int port
, int mtu
, int capture_ports
, int playback_ports
, int midi_input_ports
, int midi_output_ports
,
57 int sample_rate
, int period_size
, int resample_factor
,
58 const char* net_name
, uint transport_sync
, int bitdepth
, int use_autoconfig
,
59 int latency
, int redundancy
, int dont_htonl_floats
, int always_deadline
, int jitter_val
);
62 int Open ( jack_nframes_t frames_per_cycle
, jack_nframes_t rate
, bool capturing
, bool playing
,
63 int inchannels
, int outchannels
, bool monitor
, const char* capture_driver_name
,
64 const char* playback_driver_name
, jack_nframes_t capture_latency
, jack_nframes_t playback_latency
);
77 // BufferSize can't be changed
78 bool IsFixedBufferSize()
83 int SetBufferSize ( jack_nframes_t buffer_size
)
88 int SetSampleRate ( jack_nframes_t sample_rate
)