feat(audio): add an option to disable sound streaming (#3833)

This commit is contained in:
Clutchnp 2025-05-01 21:09:43 +05:30 committed by GitHub
commit 8ef838bada
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 40 additions and 0 deletions

View file

@ -129,6 +129,10 @@ namespace audio {
void capture(safe::mail_t mail, config_t config, void *channel_data) {
auto shutdown_event = mail->event<bool>(mail::shutdown);
if (!config::audio.stream) {
shutdown_event->view();
return;
}
auto stream = stream_configs[map_stream(config.channels, config.flags[config_t::HIGH_QUALITY])];
if (config.flags[config_t::CUSTOM_SURROUND_PARAMS]) {
apply_surround_params(stream, config.customStreamParams);