diff options
Diffstat (limited to 'src/audio/audio_device.h')
-rw-r--r-- | src/audio/audio_device.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/audio/audio_device.h b/src/audio/audio_device.h index 5adc1bb..ec81996 100644 --- a/src/audio/audio_device.h +++ b/src/audio/audio_device.h @@ -122,4 +122,30 @@ private: }; #endif +#ifdef HAVE_JACK +class t_jack_io : public t_audio_io { +public: + t_jack_io(); + virtual ~t_jack_io(); + void enable(bool enable_playback, bool enable_recording); + void flush(bool playback_buffer, bool recording_buffer); + int get_buffer_space(bool is_recording_buffer); + int get_buffer_size(bool is_recording_buffer); + bool play_buffer_underrun(void); + int read(unsigned char* buf, int len); + int write(const unsigned char* buf, int len); +protected: + bool open(const string& device, + bool playback, + bool capture, + bool blocking, + int channels, t_audio_sampleformat format, + int sample_rate, + bool short_latency); +private: + int fd; + int play_buffersize, rec_buffersize; +}; +#endif + #endif |