Skip to content

Commit ce97c6d

Browse files
committed
Merge branch 'release/2.3' into master
2 parents f9236fe + 69e7875 commit ce97c6d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/sfloader/fluid_sffile.c

+6
Original file line numberDiff line numberDiff line change
@@ -2500,6 +2500,12 @@ static int fluid_sffile_read_vorbis(SFData *sf, unsigned int start_byte, unsigne
25002500
goto error_exit;
25012501
}
25022502

2503+
// Avoid clipping for loud samples, see
2504+
// https://github.com/FluidSynth/fluidsynth/issues/1380
2505+
// and
2506+
// https://github.com/libsndfile/libsndfile/issues/194
2507+
sf_command(sndfile, SFC_SET_SCALE_FLOAT_INT_READ, NULL, SF_TRUE);
2508+
25032509
/* Automatically decompresses the Ogg Vorbis data to 16-bit PCM */
25042510
if(sf_readf_short(sndfile, wav_data, sfinfo.frames) < sfinfo.frames)
25052511
{

0 commit comments

Comments
 (0)