mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
- preserve the factor set by I_SetMusicVolume when starting new music.
This commit is contained in:
parent
4bf19fb665
commit
e956d19769
1 changed files with 6 additions and 1 deletions
|
@ -227,7 +227,12 @@ void MusInfo::Start(bool loop, float rel_vol, int subsong)
|
||||||
{
|
{
|
||||||
if (nomusic) return;
|
if (nomusic) return;
|
||||||
|
|
||||||
if (rel_vol > 0.f) saved_relative_volume = relative_volume = rel_vol;
|
if (rel_vol > 0.f)
|
||||||
|
{
|
||||||
|
float factor = relative_volume / saved_relative_volume;
|
||||||
|
saved_relative_volume = rel_vol;
|
||||||
|
relative_volume = saved_relative_volume * factor;
|
||||||
|
}
|
||||||
Stop ();
|
Stop ();
|
||||||
Play (loop, subsong);
|
Play (loop, subsong);
|
||||||
m_NotStartedYet = false;
|
m_NotStartedYet = false;
|
||||||
|
|
Loading…
Reference in a new issue