New Audio volume multipliers

Multiply the audio volume of Media Source by alpha and/or opacity (timeline).
This commit is contained in:
Bruno Herbelin
2023-10-28 16:18:15 +02:00
parent 5a1a88bf33
commit 053a5e9dbe
6 changed files with 87 additions and 13 deletions

View File

@@ -898,6 +898,9 @@ void SessionLoader::visit(MediaPlayer &n)
int audiovolume = 100;
mediaplayerNode->QueryIntAttribute("audio_volume", &audiovolume);
n.setAudioVolume(audiovolume);
int audiomix = 0;
mediaplayerNode->QueryIntAttribute("audio_mix", &audiomix);
n.setAudioVolumeMix( (MediaPlayer::VolumeFactorsMix) audiomix);
bool audioenabled = false;
mediaplayerNode->QueryBoolAttribute("audio", &audioenabled);
n.setAudioEnabled(audioenabled);