mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-26 06:11:01 +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;
|
||||
|
||||
// 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