feat(audio): add an option to disable sound streaming (#3833)
This commit is contained in:
parent
7b6818ab4a
commit
8ef838bada
6 changed files with 40 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -511,6 +511,7 @@ namespace config {
|
|||
audio_t audio {
|
||||
{}, // audio_sink
|
||||
{}, // virtual_sink
|
||||
true, // stream audio
|
||||
true, // install_steam_drivers
|
||||
};
|
||||
|
||||
|
|
@ -1160,6 +1161,7 @@ namespace config {
|
|||
|
||||
string_f(vars, "audio_sink", audio.sink);
|
||||
string_f(vars, "virtual_sink", audio.virtual_sink);
|
||||
bool_f(vars, "stream_audio", audio.stream);
|
||||
bool_f(vars, "install_steam_audio_drivers", audio.install_steam_drivers);
|
||||
|
||||
string_restricted_f(vars, "origin_web_ui_allowed", nvhttp.origin_web_ui_allowed, {"pc"sv, "lan"sv, "wan"sv});
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ namespace config {
|
|||
struct audio_t {
|
||||
std::string sink;
|
||||
std::string virtual_sink;
|
||||
bool stream;
|
||||
bool install_steam_drivers;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue