Skip to content

Commit

Permalink
FluidSynth: Changed how music volume is applied
Browse files Browse the repository at this point in the history
IssueID #2384
  • Loading branch information
skyjake committed Dec 27, 2019
1 parent cab9229 commit bb5f908
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions doomsday/apps/plugins/fluidsynth/src/fluidsynth_music.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ static void startPlayer()

startWorker();

// Update the buffer's volume.
DMFluid_Sfx()->Set(sfxBuf, SFXBP_VOLUME, musicVolume);
// Volume applied via synthesizer gain setting.
DMFluid_Sfx()->Set(sfxBuf, SFXBP_VOLUME, 1.0f);

DMFluid_Sfx()->Play(sfxBuf);
}
Expand Down Expand Up @@ -382,10 +382,7 @@ void DM_Music_Set(int prop, float value)
{
case MUSIP_VOLUME:
musicVolume = value;
if (sfxBuf)
{
DMFluid_Sfx()->Set(sfxBuf, SFXBP_VOLUME, musicVolume);
}
fluid_synth_set_gain(DMFluid_Synth(), musicVolume * MAX_SYNTH_GAIN);
DSFLUIDSYNTH_TRACE("Music_Set: MUSIP_VOLUME = " << musicVolume);
break;

Expand Down

0 comments on commit bb5f908

Please sign in to comment.