mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-16 17:11:33 +00:00
Merge branch 'fix-module-volume' into 'next'
Make module music volume more accurate See merge request STJr/SRB2!2215
This commit is contained in:
commit
553c4b9ce9
1 changed files with 4 additions and 4 deletions
|
@ -759,8 +759,8 @@ static void mix_gme(void *udata, Uint8 *stream, int len)
|
||||||
music_volume = 18;
|
music_volume = 18;
|
||||||
|
|
||||||
// apply volume to stream
|
// apply volume to stream
|
||||||
for (i = 0, p = (short *)stream; i < len/2; i++, p++)
|
for (i = 0, p = (short *)stream; i < len / 2; i++, p++)
|
||||||
*p = ((INT32)*p) * (music_volume*internal_volume/100)*2 / 40;
|
*p = ((INT32)*p) * music_volume * internal_volume / 100 / 20;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -783,8 +783,8 @@ static void mix_openmpt(void *udata, Uint8 *stream, int len)
|
||||||
music_volume = 18;
|
music_volume = 18;
|
||||||
|
|
||||||
// apply volume to stream
|
// apply volume to stream
|
||||||
for (i = 0, p = (short *)stream; i < len/2; i++, p++)
|
for (i = 0, p = (short *)stream; i < len / 2; i++, p++)
|
||||||
*p = ((INT32)*p) * (music_volume*internal_volume/100)*2 / 40;
|
*p = ((INT32)*p) * music_volume * internal_volume / 100 / 20;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue