feat: audio - add concurrent mixing, output switching, and device-aware UI
This commit is contained in:
@@ -259,6 +259,8 @@ namespace montauk::abi {
|
||||
static constexpr int AUDIO_CTL_GET_MUTE = 10;
|
||||
static constexpr int AUDIO_CTL_SET_MASTER_MUTE = 11;
|
||||
static constexpr int AUDIO_CTL_GET_MASTER_MUTE = 12;
|
||||
static constexpr int AUDIO_OUTPUT_HDA = 0;
|
||||
static constexpr int AUDIO_OUTPUT_BLUETOOTH = 1;
|
||||
|
||||
static constexpr int SOCK_TCP = 1;
|
||||
static constexpr int SOCK_UDP = 2;
|
||||
|
||||
@@ -188,6 +188,8 @@ struct DesktopState {
|
||||
bool vol_dragging; // slider drag in progress
|
||||
uint64_t vol_last_poll;
|
||||
uint64_t vol_serial; // last seen mixer state serial
|
||||
int vol_output; // 0=HDA, 1=Bluetooth
|
||||
int vol_bt_status; // A2DP state (>=2 means selectable)
|
||||
|
||||
// Temperature monitoring
|
||||
static constexpr int MAX_THERMAL_ZONES = 8;
|
||||
|
||||
@@ -514,6 +514,9 @@ namespace montauk {
|
||||
inline int audio_get_output(int handle) {
|
||||
return audio_ctl(handle, montauk::abi::AUDIO_CTL_GET_OUTPUT, 0);
|
||||
}
|
||||
inline int audio_set_output(int output) {
|
||||
return audio_ctl(-1, montauk::abi::AUDIO_CTL_SET_OUTPUT, output);
|
||||
}
|
||||
inline int audio_bt_status(int handle) {
|
||||
return audio_ctl(handle, montauk::abi::AUDIO_CTL_BT_STATUS, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user