diff --git a/src/ossia/audio/pipewire_protocol.hpp b/src/ossia/audio/pipewire_protocol.hpp index 0ea20d18fd0..039a4c7ab76 100644 --- a/src/ossia/audio/pipewire_protocol.hpp +++ b/src/ossia/audio/pipewire_protocol.hpp @@ -813,7 +813,7 @@ class pipewire_audio_protocol : public audio_engine // Actual execution ossia::audio_tick_state ts{float_input, float_output, (int)inputs, - (int)outputs, nframes, position->clock.nsec / 1e9}; + (int)outputs, nframes, position->clock.nsec * 1e-9}; self.audio_tick(ts); self.tick_end(); } diff --git a/src/ossia/network/common/path.cpp b/src/ossia/network/common/path.cpp index 6b9e0ac7c15..f19e7ba1dcf 100644 --- a/src/ossia/network/common/path.cpp +++ b/src/ossia/network/common/path.cpp @@ -417,11 +417,10 @@ bool match(std::string_view address, const regex_path::path_element& e) } -namespace ossia +namespace ossia::regex_path { -std::ostream& -regex_path::operator<<(std::ostream& s, const ossia::regex_path::path_element& p) +std::ostream& operator<<(std::ostream& s, const ossia::regex_path::path_element& p) { return s << p.address; } diff --git a/src/ossia/network/common/path.hpp b/src/ossia/network/common/path.hpp index a0715574127..1c8d85eae5e 100644 --- a/src/ossia/network/common/path.hpp +++ b/src/ossia/network/common/path.hpp @@ -49,12 +49,12 @@ struct OSSIA_EXPORT path_element { } - OSSIA_EXPORT - friend std::ostream& operator<<(std::ostream& s, const path_element& p); - operator std::string() const { return address; } }; +OSSIA_EXPORT +std::ostream& operator<<(std::ostream& s, const path_element& p); + //! Represents a device in a path, e.g. "foo:" struct OSSIA_EXPORT device : public path_element { diff --git a/src/ossia/protocols/mqtt/mqtt_protocol.cpp b/src/ossia/protocols/mqtt/mqtt_protocol.cpp index 8a72b8afa3e..e8b60713801 100644 --- a/src/ossia/protocols/mqtt/mqtt_protocol.cpp +++ b/src/ossia/protocols/mqtt/mqtt_protocol.cpp @@ -183,7 +183,8 @@ void mqtt5_protocol::on_subscribe(const ossia::net::parameter_base& p) m_subscriptions.visit(&p, [this, &p](auto& res) { subscribe_state& sub = res.second; - if(std::exchange(sub.state, sub.operating) == sub.operating) + if(std::exchange(sub.state, subscribe_state::operating) + == subscribe_state::operating) return; co_spawn( @@ -198,7 +199,8 @@ void mqtt5_protocol::on_unsubscribe(const ossia::net::parameter_base& p) { m_subscriptions.visit(&p, [this, &p](auto& res) { subscribe_state& sub = res.second; - if(std::exchange(sub.state, sub.cancelled) == sub.operating) + if(std::exchange(sub.state, subscribe_state::cancelled) + == subscribe_state::operating) sub.cancellation.emit(boost::asio::cancellation_type::all); }); }