feat: audio - add concurrent mixing, output switching, and device-aware UI

This commit is contained in:
2026-07-29 20:03:35 +01:00
parent d99dab45e5
commit 86de3400a9
25 changed files with 688 additions and 209 deletions
+2
View File
@@ -240,6 +240,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;
+2
View File
@@ -189,6 +189,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;
@@ -498,6 +498,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);
}