summaryrefslogtreecommitdiff
path: root/src/audio/devices.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/devices.hpp')
-rw-r--r--src/audio/devices.hpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/audio/devices.hpp b/src/audio/devices.hpp
index 9d3de7d..c83bdb4 100644
--- a/src/audio/devices.hpp
+++ b/src/audio/devices.hpp
@@ -17,8 +17,18 @@ public:
Glib::RefPtr<Gtk::ListStore> GetCaptureDeviceModel();
void SetDevices(ma_device_info *pPlayback, ma_uint32 playback_count, ma_device_info *pCapture, ma_uint32 capture_count);
- std::optional<ma_device_id> GetPlaybackDeviceIDFromModel(const Gtk::TreeModel::iterator &iter) const;
- std::optional<ma_device_id> GetCaptureDeviceIDFromModel(const Gtk::TreeModel::iterator &iter) const;
+
+ [[nodiscard]] std::optional<ma_device_id> GetPlaybackDeviceIDFromModel(const Gtk::TreeModel::iterator &iter) const;
+ [[nodiscard]] std::optional<ma_device_id> GetCaptureDeviceIDFromModel(const Gtk::TreeModel::iterator &iter) const;
+
+ [[nodiscard]] std::optional<ma_device_id> GetDefaultPlayback() const;
+ [[nodiscard]] std::optional<ma_device_id> GetDefaultCapture() const;
+
+ void SetActivePlaybackDevice(const Gtk::TreeModel::iterator &iter);
+ void SetActiveCaptureDevice(const Gtk::TreeModel::iterator &iter);
+
+ Gtk::TreeModel::iterator GetActivePlaybackDevice();
+ Gtk::TreeModel::iterator GetActiveCaptureDevice();
private:
class PlaybackColumns : public Gtk::TreeModel::ColumnRecord {
@@ -30,6 +40,8 @@ private:
};
PlaybackColumns m_playback_columns;
Glib::RefPtr<Gtk::ListStore> m_playback;
+ Gtk::TreeModel::iterator m_active_playback_iter;
+ Gtk::TreeModel::iterator m_default_playback_iter;
class CaptureColumns : public Gtk::TreeModel::ColumnRecord {
public:
@@ -40,5 +52,7 @@ private:
};
CaptureColumns m_capture_columns;
Glib::RefPtr<Gtk::ListStore> m_capture;
+ Gtk::TreeModel::iterator m_active_capture_iter;
+ Gtk::TreeModel::iterator m_default_capture_iter;
};
#endif