mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-01 00:21:14 +00:00
match up sample loop check of vorbis compressed samples
with uncompressed ones
This commit is contained in:
parent
4f27a9a849
commit
59545adac2
1 changed files with 5 additions and 2 deletions
|
@ -1965,6 +1965,8 @@ fluid_sample_import_sfont(fluid_sample_t* sample, SFSample* sfsample, fluid_defs
|
|||
sample->loopstart >= sample->loopend ||
|
||||
sample->loopstart < sample->start)
|
||||
{
|
||||
/* always use whole sample, having an equivalent treatment to uncompressed samples */
|
||||
#if 0
|
||||
/* can pad loop by 8 samples and ensure at least 4 for loop (2*8+4) */
|
||||
if ((sample->end - sample->start) >= 20)
|
||||
{
|
||||
|
@ -1972,9 +1974,10 @@ fluid_sample_import_sfont(fluid_sample_t* sample, SFSample* sfsample, fluid_defs
|
|||
sample->loopend = sample->end - 8;
|
||||
}
|
||||
else /* loop is fowled, sample is tiny (can't pad 8 samples) */
|
||||
#endif
|
||||
{
|
||||
sample->loopstart = sample->start + 1;
|
||||
sample->loopend = sample->end - 1;
|
||||
sample->loopstart = sample->start;
|
||||
sample->loopend = sample->end;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue