diff options
Diffstat (limited to 'raul/JackDriver.h')
-rw-r--r-- | raul/JackDriver.h | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/raul/JackDriver.h b/raul/JackDriver.h index b16eeb3..22e2002 100644 --- a/raul/JackDriver.h +++ b/raul/JackDriver.h @@ -24,6 +24,8 @@ using std::string; +namespace Raul { + /** Handles all externally driven functionality, registering ports etc. * @@ -39,29 +41,29 @@ public: void attach(const string& client_name); void detach(); - bool is_attached() const { return (m_client != NULL); } - bool is_realtime() const { return m_client && jack_is_realtime(m_client); } + bool is_attached() const { return (_client != NULL); } + bool is_realtime() const { return _client && jack_is_realtime(_client); } - void start_transport() { jack_transport_start(m_client); } - void stop_transport() { jack_transport_stop(m_client); } + void start_transport() { jack_transport_start(_client); } + void stop_transport() { jack_transport_stop(_client); } void rewind_transport() { jack_position_t zero; zero.frame = 0; zero.valid = (jack_position_bits_t)0; - jack_transport_reposition(m_client, &zero); + jack_transport_reposition(_client, &zero); } jack_nframes_t buffer_size(); bool set_buffer_size(jack_nframes_t size); - inline float sample_rate() { return jack_get_sample_rate(m_client); } + inline float sample_rate() { return jack_get_sample_rate(_client); } - inline size_t xruns() { return m_xruns; } + inline size_t xruns() { return _xruns; } void reset_xruns(); - inline float max_delay() { return jack_get_max_delayed_usecs(m_client); } - inline void reset_delay() { jack_reset_max_delayed_usecs(m_client); } + inline float max_delay() { return jack_get_max_delayed_usecs(_client); } + inline void reset_delay() { jack_reset_max_delayed_usecs(_client); } protected: /** Process callback. Derived classes should do all audio processing here. */ @@ -94,14 +96,16 @@ private: static int jack_xrun_cb(void* me); static void jack_shutdown_cb(void* me); - jack_client_t* m_client; + jack_client_t* _client; - bool m_is_activated; - jack_position_t m_last_pos; - jack_nframes_t m_buffer_size; - size_t m_xruns; - float m_xrun_delay; + bool _is_activated; + jack_position_t _last_pos; + jack_nframes_t _buffer_size; + size_t _xruns; + float _xrun_delay; }; +} // namespace Raul + #endif // RAUL_JACKDRIVER_H |