[Scummvm-devel] Audio volume control (proposed mixer/imuse/... changes)
Pawel Kolodziejski
pablo at omega.xtr.net.pl
Sun Nov 28 11:12:02 CET 2004
> * IMuseDigital does its own volume effects, based on these three types
> of audio data
that three volumes are as addons to volume control, and they are need to
be between imuse volume control(initial sound volume, fades) and mixer
master volume. effective "type" volume level is independent of imuse(i
mean, it not cause change internal imuse volume logic). volGroupId tell to
what mixer channel sound belongs. imuse should only tell to mixer what
volume level is for each volume group.
path for scumm sound volume control:
scumm script volume level -> imuse(control sample volume level, fades) ->
attach and set volume level of groups(master(should be, compared to
original imuse, not as in scummvm exist), music, sfx, voice) -> mixer.
> * we add a AudioDataType enum to the mixer; with audio types "none",
> "sfx", "speech", "music" (possibly more in the future)
(answer to below too)
original imuse "controling" master volume too(it's numbered as volume
group 0), but it's not used in scumm hames.
> * we add a method (or methods) to the mixer to set the volumes for each
> of the times
yes, it will be required while playing imuse.
> * when starting playback via the mixer, or when setting a premix hook,
> you can specify the audio type this is
yes, same(similiar) as typical channel, i think
> * the data is then volume-scaled based on the volume set for that type
i don't understand that sentence the same as next to next below point.
> * type "none" is not volume scaled at all, which still allows engines
> to do their own volume effects if needed
sounds good for me, as kind additional "option"
> * note: these are the "base" volumes; of course the ability to change
> the volume/balance of each sound directly will be retained!
i'm not sure what you mean. you could precise path of volume control.
> * we need to discuss whether we want to / need to retain the global
> "master" volume. If we keep it, it should effect *everything*; setting
> it to 0 would effectively mute all sound.
"master" as most priority volume control might be usefull.
from imuse point, "master" is like one of volume groups and it's
independent to rest volumes groups, but our imuse not needed as i wrote
above.
> As a consequence, we could simplify the audio options in SCUMM, get rid
> of the extra volume processing in IMuseDigitial, hopefully simplify the
> code in some of the other backends too, and overall end up with a more
> transparent yet more powerful SoundMixer.
yes, and i was interested in past(while implementing that "extra
processing") in adding such sound types to mixer channel, but i droped
taking that task.
Pawel
More information about the Scummvm-devel
mailing list