summaryrefslogtreecommitdiffstats
path: root/src/server/JackDriver.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/JackDriver.hpp')
-rw-r--r--src/server/JackDriver.hpp50
1 files changed, 26 insertions, 24 deletions
diff --git a/src/server/JackDriver.hpp b/src/server/JackDriver.hpp
index d4ea03d0..8bb7cff3 100644
--- a/src/server/JackDriver.hpp
+++ b/src/server/JackDriver.hpp
@@ -42,13 +42,9 @@ namespace raul {
class Path;
} // namespace raul
-namespace boost {
-namespace intrusive {
-
+namespace boost::intrusive {
template <bool Enabled> struct cache_last;
-
-} // namespace intrusive
-} // namespace boost
+} // namespace boost::intrusive
namespace ingen {
@@ -96,8 +92,8 @@ public:
/** Transport state for this frame.
* Intended to only be called from the audio thread. */
- inline const jack_position_t* position() { return &_position; }
- inline jack_transport_state_t transport_state() { return _transport_state; }
+ const jack_position_t* position() { return &_position; }
+ jack_transport_state_t transport_state() { return _transport_state; }
void append_time_events(RunContext& ctx, Buffer& buffer) override;
@@ -114,7 +110,8 @@ public:
return _client ? jack_frame_time(_client) : 0;
}
- class PortRegistrationFailedException : public std::exception {};
+ class PortRegistrationFailedException : public std::exception
+ {};
private:
friend class JackPort;
@@ -122,16 +119,21 @@ private:
static void thread_init_cb(void* jack_driver);
// Static JACK callbacks which call the non-static callbacks (methods)
- inline static void shutdown_cb(void* const jack_driver) {
+
+ static void shutdown_cb(void* const jack_driver) {
return static_cast<JackDriver*>(jack_driver)->_shutdown_cb();
}
- inline static int process_cb(jack_nframes_t nframes, void* const jack_driver) {
+
+ static int process_cb(jack_nframes_t nframes, void* const jack_driver) {
return static_cast<JackDriver*>(jack_driver)->_process_cb(nframes);
}
- inline static int block_length_cb(jack_nframes_t nframes, void* const jack_driver) {
+
+ static int block_length_cb(jack_nframes_t nframes, void* const jack_driver) {
return static_cast<JackDriver*>(jack_driver)->_block_length_cb(nframes);
}
+ // Internal methods for processing
+
void pre_process_port(RunContext& ctx, EnginePort* port);
void post_process_port(RunContext& ctx, EnginePort* port) const;
@@ -154,19 +156,19 @@ protected:
Ports _ports;
AudioBufPtr _fallback_buffer;
LV2_Atom_Forge _forge;
- raul::Semaphore _sem;
- std::atomic<bool> _flag;
- jack_client_t* _client;
- jack_nframes_t _block_length;
- size_t _seq_size;
- jack_nframes_t _sample_rate;
+ raul::Semaphore _sem{0};
+ std::atomic<bool> _flag{false};
+ jack_client_t* _client{nullptr};
+ jack_nframes_t _block_length{0};
+ size_t _seq_size{0};
+ jack_nframes_t _sample_rate{0};
uint32_t _midi_event_type;
- bool _is_activated;
- jack_position_t _position;
- jack_transport_state_t _transport_state;
- double _old_bpm;
- jack_nframes_t _old_frame;
- bool _old_rolling;
+ bool _is_activated{false};
+ jack_position_t _position{};
+ jack_transport_state_t _transport_state{};
+ double _old_bpm{120.0};
+ jack_nframes_t _old_frame{0};
+ bool _old_rolling{false};
};
} // namespace server