Audio experiments

This commit is contained in:
2026-05-05 12:18:42 +10:00
parent f836c53d10
commit 9a8748687a
6 changed files with 719 additions and 80 deletions

View File

@@ -1191,6 +1191,16 @@ bool RuntimeHost::LoadConfig(std::string& error)
mConfig.enableExternalKeying = enableExternalKeyingValue->asBoolean(mConfig.enableExternalKeying);
if (const JsonValue* audioEnabledValue = configJson.find("audioEnabled"))
mConfig.audioEnabled = audioEnabledValue->asBoolean(mConfig.audioEnabled);
if (const JsonValue* audioOutputEnabledValue = configJson.find("audioOutputEnabled"))
mConfig.audioOutputEnabled = audioOutputEnabledValue->asBoolean(mConfig.audioOutputEnabled);
if (const JsonValue* audioScheduleEnabledValue = configJson.find("audioScheduleEnabled"))
mConfig.audioScheduleEnabled = audioScheduleEnabledValue->asBoolean(mConfig.audioScheduleEnabled);
if (const JsonValue* audioPrerollEnabledValue = configJson.find("audioPrerollEnabled"))
mConfig.audioPrerollEnabled = audioPrerollEnabledValue->asBoolean(mConfig.audioPrerollEnabled);
if (const JsonValue* audioScheduleSilenceValue = configJson.find("audioScheduleSilence"))
mConfig.audioScheduleSilence = audioScheduleSilenceValue->asBoolean(mConfig.audioScheduleSilence);
if (const JsonValue* audioScheduleToneValue = configJson.find("audioScheduleTone"))
mConfig.audioScheduleTone = audioScheduleToneValue->asBoolean(mConfig.audioScheduleTone);
if (const JsonValue* audioChannelCountValue = configJson.find("audioChannelCount"))
mConfig.audioChannelCount = static_cast<unsigned>(audioChannelCountValue->asNumber(static_cast<double>(mConfig.audioChannelCount)));
if (const JsonValue* audioSampleRateValue = configJson.find("audioSampleRate"))
@@ -1542,6 +1552,11 @@ JsonValue RuntimeHost::BuildStateValue() const
app.set("maxTemporalHistoryFrames", JsonValue(static_cast<double>(mConfig.maxTemporalHistoryFrames)));
app.set("enableExternalKeying", JsonValue(mConfig.enableExternalKeying));
app.set("audioEnabled", JsonValue(mConfig.audioEnabled));
app.set("audioOutputEnabled", JsonValue(mConfig.audioOutputEnabled));
app.set("audioScheduleEnabled", JsonValue(mConfig.audioScheduleEnabled));
app.set("audioPrerollEnabled", JsonValue(mConfig.audioPrerollEnabled));
app.set("audioScheduleSilence", JsonValue(mConfig.audioScheduleSilence));
app.set("audioScheduleTone", JsonValue(mConfig.audioScheduleTone));
app.set("audioChannelCount", JsonValue(static_cast<double>(mConfig.audioChannelCount)));
app.set("audioSampleRate", JsonValue(static_cast<double>(mConfig.audioSampleRate)));
app.set("audioDelayMode", JsonValue(mConfig.audioDelayMode));