aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/midi
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/midi')
-rw-r--r--Alc/midi/base.c1
-rw-r--r--Alc/midi/fluidsynth.c2
-rw-r--r--Alc/midi/sf2load.c9
3 files changed, 8 insertions, 4 deletions
diff --git a/Alc/midi/base.c b/Alc/midi/base.c
index 8b498680..470157e1 100644
--- a/Alc/midi/base.c
+++ b/Alc/midi/base.c
@@ -300,6 +300,7 @@ void ALfontsound_Construct(ALfontsound *self)
self->LoopStart = 0;
self->LoopEnd = 0;
self->SampleRate = 0;
+ self->LoopMode = AL_NONE;
self->PitchKey = 0;
self->PitchCorrection = 0;
self->SampleType = AL_NONE;
diff --git a/Alc/midi/fluidsynth.c b/Alc/midi/fluidsynth.c
index 24937192..5b57de21 100644
--- a/Alc/midi/fluidsynth.c
+++ b/Alc/midi/fluidsynth.c
@@ -163,7 +163,7 @@ static int FPreset_noteOn(fluid_preset_t *preset, fluid_synth_t *synth, int chan
if(voice == NULL)
return FLUID_FAILED;
- //fluid_voice_gen_set(voice, );
+ fluid_voice_gen_set(voice, 54, sound->LoopMode);
for(m = 0;m < sample->NumMods;m++)
fluid_voice_add_mod(voice, &sample->Mods[m], FLUID_VOICE_OVERWRITE);
diff --git a/Alc/midi/sf2load.c b/Alc/midi/sf2load.c
index 52ce931c..0c276d71 100644
--- a/Alc/midi/sf2load.c
+++ b/Alc/midi/sf2load.c
@@ -828,7 +828,7 @@ static void fillZone(ALuint id, const GenModList *zone)
0, /* 51 - corseTune */
0, /* 52 - fineTune */
0, /* 53 - */
- 0, /* 54 - sampleModes */
+ AL_LOOP_MODE_SOFT, /* 54 - sampleModes */
0, /* 55 - */
0, /* 56 - scaleTuning */
0, /* 57 - exclusiveClass */
@@ -872,9 +872,12 @@ static void fillZone(ALuint id, const GenModList *zone)
param = Gen2Param[gen->mGenerator];
if(param)
{
- if(param == AL_BASE_KEY_SOFT && gen->mAmount == 0xffff)
+ ALint value = (ALshort)gen->mAmount;
+ if(param == AL_BASE_KEY_SOFT && value == -1)
break;
- alFontsoundiSOFT(id, param, (ALshort)gen->mAmount);
+ if(param == AL_LOOP_MODE_SOFT && value == 2)
+ value = 0;
+ alFontsoundiSOFT(id, param, value);
}
else if(gen->mGenerator < 256)
{