Skip to content

Commit

Permalink
Merge branch 'release/2.3' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
derselbst committed Sep 19, 2024
2 parents f9236fe + 69e7875 commit ce97c6d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sfloader/fluid_sffile.c
Original file line number Diff line number Diff line change
Expand Up @@ -2500,6 +2500,12 @@ static int fluid_sffile_read_vorbis(SFData *sf, unsigned int start_byte, unsigne
goto error_exit;
}

// Avoid clipping for loud samples, see
// https://github.com/FluidSynth/fluidsynth/issues/1380
// and
// https://github.com/libsndfile/libsndfile/issues/194
sf_command(sndfile, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE);

/* Automatically decompresses the Ogg Vorbis data to 16-bit PCM */
if(sf_readf_short(sndfile, wav_data, sfinfo.frames) < sfinfo.frames)
{
Expand Down

0 comments on commit ce97c6d

Please sign in to comment.