aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/midi/sf2load.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-12-29 00:34:58 -0800
committerChris Robinson <[email protected]>2013-12-29 00:34:58 -0800
commit09665715ed0c0897834279dcc3f15c24ed01ec2d (patch)
tree9267920477144a2c332486846355c8ceeb4ce27f /Alc/midi/sf2load.c
parent0d7996409ea300eab47fff096c2d3c5aea592a29 (diff)
Add support for the fontsound loop mode
Diffstat (limited to 'Alc/midi/sf2load.c')
-rw-r--r--Alc/midi/sf2load.c9
1 files changed, 6 insertions, 3 deletions
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)
{