- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- // device state control methods
-
- /** Get the number of all enabled Audio inputs.
- *
- * @return number of all enabled Audio inputs
- */
- uint32_t get_available_inputs_count() const;
- /** Get the number of all enabled Audio outputs.
- *
- * @return number of all enabled Audio outputs
- */
- uint32_t get_available_outputs_count () const;
-
- /** Get vector of all enabled physical Audio input port names.
- *
- * @param[out] port_names - vector of all enabled Audio input names
- */
- void get_physical_audio_inputs (std::vector<std::string>& port_names);
- /** Get vector of all enabled physical Audio input port names.
- *
- * @param[out] port_names - vector of all enabled Audio input names
- */
- void get_physical_audio_outputs (std::vector<std::string>& port_names);
-
- /** Get vector of all enabled physical MIDI input port names.
- *
- * @param[out] port_names - vector of all enabled MIDI input names
- */
- void get_physical_midi_inputs (std::vector<std::string>& port_names);
- /** Get vector of all enabled physical MIDI output port names.
- *
- * @param[out] port_names - vector of all enabled MIDI output names
- */
- void get_physical_midi_outputs (std::vector<std::string>& port_names);
-
- /** Sets new state to all Audio inputs.
- *
- * @param[in] state - new state
- */
- void set_state_to_all_inputs(bool state);
- /** Sets new state to all Audio outputs.
- * @note Does nothing in Stereo Out mode
- * @param[in] state - new state
- */
- void set_state_to_all_outputs(bool state);
-
- /** Get vector of states for all physical Audio input ports.
- *
- * @param[out] channel_states - vector of input port states
- */
- void get_physical_audio_input_states(std::vector<PortState>& channel_states);
- /** Get vector of states for all physical Audio output ports.
- *
- * @param[out] channel_states - vector of output port states
- */
- void get_physical_audio_output_states(std::vector<PortState>& channel_states);
-
- /** Set state of the specified Audio input port.
- *
- * @param[in] port_name - input name
- * @param[in] state - new state
- */
- void set_physical_audio_input_state(const std::string& port_name, bool state);
- /** Set state of the specified Audio output port.
- *
- * @param[in] port_name - output name
- * @param[in] state - new state
- */
- void set_physical_audio_output_state(const std::string& port_name, bool state);
-
- /** Get state of the specified Audio input port.
- *
- * @param[in] port_name - input name
- * @return input state
- */
- bool get_physical_audio_input_state(const std::string& port_name);
- /** Get state of the specified Audi output port.
- *
- * @param[in] port_name - output name
- * @return output state
- */
- bool get_physical_audio_output_state(const std::string& port_name);
-
- /** Get vector of all enabled MIDI input port names.
- *
- * @param[out] channel_states - vector of enabled inputs
- */
- void get_physical_midi_input_states (std::vector<MidiPortState>& channel_states);
- /** Get vector of all enabled MIDI output port names.
- *
- * @param[out] channel_states - vector of enabled outputs
- */
- void get_physical_midi_output_states (std::vector<MidiPortState>& channel_states);
-
- /** Set state of the specified MIDI input port.
- *
- * @param[in] port_name - input name
- * @param[in] state - new state
- */
- void set_physical_midi_input_state(const std::string& port_name, bool state);
- /** Set state of the specified MIDI output port.
- *
- * @param[in] port_name - output name
- * @param[in] state - new state
- */
- void set_physical_midi_output_state(const std::string& port_name, bool state);
- /** Get state of the specified MIDI input port.
- *
- * @param[in] port_name - input name
- * @param[out] scene_connected - is port used as Scene In or not
- * @return input state
- */
- bool get_physical_midi_input_state(const std::string& port_name, bool& scene_connected);
- /** Get state of the specified MIDI output port.
- *
- * @param[in] port_name - output name
- * @param[out] scene_connected - is port used as Scene Out or not
- * @return output state
- */
- bool get_physical_midi_output_state(const std::string& port_name, bool& scene_connected);
-
- /** Set state of Scene In connection for the specified MIDI input port.
- *
- * @param[in] port_name - input name
- * @param[in] state - new state
- */
- void set_physical_midi_scene_in_connection_state(const std::string& port_name, bool state);
- /** Set state of Scene Out connection for the specified MIDI output port.
- *
- * @param[in] port_name - input name
- * @param[in] state - new state
- */
- void set_physical_midi_scenen_out_connection_state(const std::string&, bool);
-
- /** Disocnnect all MIDI input ports from Scene In.
- */
- void set_all_midi_scene_inputs_disconnected();
- /** Disocnnect all MIDI output ports from Scene Out.
- */
- void set_all_midi_scene_outputs_disconnected();
-
- /** Set MIDI TimeCode input port
- * @note There is a sense to choose MIDI TimeCode input only because
- * our MIDI TimeCode is propagated to all midi output ports.
- */
- void set_mtc_input(const std::string&);
-
- /** Check if AudioEngine setup is required
- * @return true if setup is required, otherwise - false
- */
- bool is_setup_required() const {return ARDOUR::AudioEngine::instance()->setup_required (); }
-
- ////////////////////////////////////////////////////////////////////////////////////////////////////
- // Methods set parameters inside the controller
- // the state of engine won't change untill we make a "push" of this state to the backend
- // NOTE: Use push_state_to_backend() method to update backend with the most recent controller state
-
- /** Set new sample rate for current device in EngineStateController database
- * @note Use push_state_to_backend() method to update backend/device state with the most recent controller state
- * @param sample_rate - new sample rate
- */
- bool set_new_sample_rate_in_controller(framecnt_t sample_rate);
- /** Set new buffer size for current device in EngineStateController database
- * @note Use push_state_to_backend() method to update backend/device state with the most recent controller state
- * @param buffer_size - new buffer size
- */
- bool set_new_buffer_size_in_controller(pframes_t buffer_size);
-
- /** @brief push current controller state to backend.
- * Propagate and set all current EngineStateController parameters to the backend
- * @note Engine will be restarted if it's running when this method is called.
- * @note If an attempt ot set parameters is unsuccessful current device will be switched to "None".
- * @param start - start the Engine if it was not running when this function was called.
- * @return true on success, otherwise - false
- */
- bool push_current_state_to_backend(bool start);
- /** Switch to new backend
- * @note The change will be propagated emmidiatelly as if push_current_state_to_backend () was called.
- * @param backend_name - new backend name.
- * @return true on success, otherwise - false
- */
- bool set_new_backend_as_current(const std::string& backend_name);
- /** Switch to new device
- * @note The change will be propagated emmidiatelly as if push_current_state_to_backend () was called.
- * @param device_name - new device name.
- * @return true on success, otherwise - false
- */
- bool set_new_device_as_current(const std::string& device_name);
+ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ // device state control methods
+
+ /** Get the number of all enabled Audio inputs.
+ *
+ * @return number of all enabled Audio inputs
+ */
+ uint32_t get_available_inputs_count() const;
+ /** Get the number of all enabled Audio outputs.
+ *
+ * @return number of all enabled Audio outputs
+ */
+ uint32_t get_available_outputs_count () const;
+
+ /** Get vector of all enabled physical Audio input port names.
+ *
+ * @param[out] port_names - vector of all enabled Audio input names
+ */
+ void get_physical_audio_inputs (std::vector<std::string>& port_names);
+ /** Get vector of all enabled physical Audio input port names.
+ *
+ * @param[out] port_names - vector of all enabled Audio input names
+ */
+ void get_physical_audio_outputs (std::vector<std::string>& port_names);
+
+ /** Get vector of all enabled physical MIDI input port names.
+ *
+ * @param[out] port_names - vector of all enabled MIDI input names
+ */
+ void get_physical_midi_inputs (std::vector<std::string>& port_names);
+ /** Get vector of all enabled physical MIDI output port names.
+ *
+ * @param[out] port_names - vector of all enabled MIDI output names
+ */
+ void get_physical_midi_outputs (std::vector<std::string>& port_names);
+
+ /** Sets new state to all Audio inputs.
+ *
+ * @param[in] state - new state
+ */
+ void set_state_to_all_inputs(bool state);
+ /** Sets new state to all Audio outputs.
+ * @note Does nothing in Stereo Out mode
+ * @param[in] state - new state
+ */
+ void set_state_to_all_outputs(bool state);
+
+ /** Get vector of states for all physical Audio input ports.
+ *
+ * @param[out] channel_states - vector of input port states
+ */
+ void get_physical_audio_input_states(std::vector<PortState>& channel_states);
+ /** Get vector of states for all physical Audio output ports.
+ *
+ * @param[out] channel_states - vector of output port states
+ */
+ void get_physical_audio_output_states(std::vector<PortState>& channel_states);
+
+ /** Set state of the specified Audio input port.
+ *
+ * @param[in] port_name - input name
+ * @param[in] state - new state
+ */
+ void set_physical_audio_input_state(const std::string& port_name, bool state);
+ /** Set state of the specified Audio output port.
+ *
+ * @param[in] port_name - output name
+ * @param[in] state - new state
+ */
+ void set_physical_audio_output_state(const std::string& port_name, bool state);
+
+ /** Get state of the specified Audio input port.
+ *
+ * @param[in] port_name - input name
+ * @return input state
+ */
+ bool get_physical_audio_input_state(const std::string& port_name);
+ /** Get state of the specified Audi output port.
+ *
+ * @param[in] port_name - output name
+ * @return output state
+ */
+ bool get_physical_audio_output_state(const std::string& port_name);
+
+ /** Get vector of all enabled MIDI input port names.
+ *
+ * @param[out] channel_states - vector of enabled inputs
+ */
+ void get_physical_midi_input_states (std::vector<MidiPortState>& channel_states);
+ /** Get vector of all enabled MIDI output port names.
+ *
+ * @param[out] channel_states - vector of enabled outputs
+ */
+ void get_physical_midi_output_states (std::vector<MidiPortState>& channel_states);
+
+ /** Set state of the specified MIDI input port.
+ *
+ * @param[in] port_name - input name
+ * @param[in] state - new state
+ */
+ void set_physical_midi_input_state(const std::string& port_name, bool state);
+ /** Set state of the specified MIDI output port.
+ *
+ * @param[in] port_name - output name
+ * @param[in] state - new state
+ */
+ void set_physical_midi_output_state(const std::string& port_name, bool state);
+ /** Get state of the specified MIDI input port.
+ *
+ * @param[in] port_name - input name
+ * @param[out] scene_connected - is port used as Scene In or not
+ * @return input state
+ */
+ bool get_physical_midi_input_state(const std::string& port_name, bool& scene_connected);
+ /** Get state of the specified MIDI output port.
+ *
+ * @param[in] port_name - output name
+ * @param[out] scene_connected - is port used as Scene Out or not
+ * @return output state
+ */
+ bool get_physical_midi_output_state(const std::string& port_name, bool& scene_connected);
+
+ /** Set state of Scene In connection for the specified MIDI input port.
+ *
+ * @param[in] port_name - input name
+ * @param[in] state - new state
+ */
+ void set_physical_midi_scene_in_connection_state(const std::string& port_name, bool state);
+ /** Set state of Scene Out connection for the specified MIDI output port.
+ *
+ * @param[in] port_name - input name
+ * @param[in] state - new state
+ */
+ void set_physical_midi_scenen_out_connection_state(const std::string&, bool);
+
+ /** Disocnnect all MIDI input ports from Scene In.
+ */
+ void set_all_midi_scene_inputs_disconnected();
+ /** Disocnnect all MIDI output ports from Scene Out.
+ */
+ void set_all_midi_scene_outputs_disconnected();
+
+ /** Set MIDI TimeCode input port
+ * @note There is a sense to choose MIDI TimeCode input only because
+ * our MIDI TimeCode is propagated to all midi output ports.
+ */
+ void set_mtc_input(const std::string&);
+
+ /** Check if AudioEngine setup is required
+ * @return true if setup is required, otherwise - false
+ */
+ bool is_setup_required() const {return ARDOUR::AudioEngine::instance()->setup_required (); }
+
+ ////////////////////////////////////////////////////////////////////////////////////////////////////
+ // Methods set parameters inside the controller
+ // the state of engine won't change untill we make a "push" of this state to the backend
+ // NOTE: Use push_state_to_backend() method to update backend with the most recent controller state
+
+ /** Set new sample rate for current device in EngineStateController database
+ * @note Use push_state_to_backend() method to update backend/device state with the most recent controller state
+ * @param sample_rate - new sample rate
+ */
+ bool set_new_sample_rate_in_controller(framecnt_t sample_rate);
+ /** Set new buffer size for current device in EngineStateController database
+ * @note Use push_state_to_backend() method to update backend/device state with the most recent controller state
+ * @param buffer_size - new buffer size
+ */
+ bool set_new_buffer_size_in_controller(pframes_t buffer_size);
+
+ /** @brief push current controller state to backend.
+ * Propagate and set all current EngineStateController parameters to the backend
+ * @note Engine will be restarted if it's running when this method is called.
+ * @note If an attempt ot set parameters is unsuccessful current device will be switched to "None".
+ * @param start - start the Engine if it was not running when this function was called.
+ * @return true on success, otherwise - false
+ */
+ bool push_current_state_to_backend(bool start);
+ /** Switch to new backend
+ * @note The change will be propagated emmidiatelly as if push_current_state_to_backend () was called.
+ * @param backend_name - new backend name.
+ * @return true on success, otherwise - false
+ */
+ bool set_new_backend_as_current(const std::string& backend_name);
+ /** Switch to new device
+ * @note The change will be propagated emmidiatelly as if push_current_state_to_backend () was called.
+ * @param device_name - new device name.
+ * @return true on success, otherwise - false
+ */
+ bool set_new_device_as_current(const std::string& device_name);