diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | src/audio/audio_device.cpp | 35 |
2 files changed, 36 insertions, 0 deletions
@@ -26,6 +26,7 @@ src/parser/scanner.cxx src/sdp/sdp_parser.cxx src/sdp/sdp_parser.hxx src/sdp/sdp_scanner.cxx +build/ # Qt Creator files CMakeLists.txt.user* diff --git a/src/audio/audio_device.cpp b/src/audio/audio_device.cpp index 84aa2db..df43c45 100644 --- a/src/audio/audio_device.cpp +++ b/src/audio/audio_device.cpp @@ -359,6 +359,41 @@ int t_oss_io::write(const unsigned char* buf, int len) { return ::write(fd, buf, len); } +#ifdef HAVE_JACK +// Constructor +t_jack_io::t_jack_io() : client(nullptr) { +} + +// Opener +bool t_jack_io::open( + const string& device, + bool playback, + bool capture, + bool blocking, + int channels, t_audio_sampleformat format, + int sample_rate, + bool short_latency + ) { + t_audio_io::open( + device, + playback, + capture, + blocking, + channels, + format, + sample_rate, + short_latency + ); + int mode = 0; + string msg = ""; + + +// Destructor +t_jack_io::~t_jack_io() { + jack_client_close(client); +} +#endif + #ifdef HAVE_LIBASOUND t_alsa_io::t_alsa_io() : pcm_play_ptr(0), pcm_rec_ptr(0), play_framesize(1), rec_framesize(1), |