mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 03:12:38 +00:00
Make module music volume more accurate
This commit is contained in:
parent
7962b243de
commit
8cc7a88c5f
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;
|
||||
|
||||
// apply volume to stream
|
||||
for (i = 0, p = (short *)stream; i < len/2; i++, p++)
|
||||
*p = ((INT32)*p) * (music_volume*internal_volume/100)*2 / 40;
|
||||
for (i = 0, p = (short *)stream; i < len / 2; i++, p++)
|
||||
*p = ((INT32)*p) * music_volume * internal_volume / 100 / 20;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -783,8 +783,8 @@ static void mix_openmpt(void *udata, Uint8 *stream, int len)
|
|||
music_volume = 18;
|
||||
|
||||
// apply volume to stream
|
||||
for (i = 0, p = (short *)stream; i < len/2; i++, p++)
|
||||
*p = ((INT32)*p) * (music_volume*internal_volume/100)*2 / 40;
|
||||
for (i = 0, p = (short *)stream; i < len / 2; i++, p++)
|
||||
*p = ((INT32)*p) * music_volume * internal_volume / 100 / 20;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue