Ensure that all math operations are done with floating point
arithmetic to avoid a floating point division by zero for small
values of _volume. In this case, the term in parenthesis would
be evaluated first via integer arithmetic and may produce easily 0.
- LUA code uses a range of 0 .. 100
- the LUA group volumes are in the range 25 .. 100, otherwise the sound
group is muted
- residualvm engine uses a range of 0 .. Audio::Mixer::kMaxChannelVolume
- do most of the conversion in lua_v2_sound.cpp
- most parts of the engine will solely use the engine internal range
- only when reading/writing the registry residualvm continues to use
a special conversion for compatibility with the volume settings
of the residualvm engine settings
- proper handling of volumes close to 0.0f in SoundTrack::updatePosition()
- if a pre-loaded sound is played again once the previous one is still
playing, it can't be stopped
- there is only one sound handle, but the mixer would create two
channels (indexed by the sound handle)
- so the channel created first could not be addressed any more
- stopping the sound (per handle) would not work
current work around: don't start one handle twice
other possible solution: make sure the mixer finds all channels which
play one handle (may require changes to common scummvm code)