11 typedef struct ALsfmodulator
{
22 typedef struct ALenvelope
{
34 typedef struct ALfontsound
{
37 struct ALbuffer
*Buffer
;
40 ALint MinVelocity
, MaxVelocity
;
43 ALint VibratoLfoToPitch
;
48 ALint ModLfoToFilterCutoff
;
49 ALint ModEnvToFilterCutoff
;
86 ALbyte PitchCorrection
;
88 struct ALfontsound
*Link
;
95 void ALfontsound_Destruct(ALfontsound
*self
);
96 void ALfontsound_setPropi(ALfontsound
*self
, ALCcontext
*context
, ALenum param
, ALint value
);
97 void ALfontsound_setModStagei(ALfontsound
*self
, ALCcontext
*context
, ALsizei stage
, ALenum param
, ALint value
);
99 ALfontsound
*NewFontsound(ALCcontext
*context
);
101 inline struct ALfontsound
*LookupFontsound(ALCdevice
*device
, ALuint id
)
102 { return (struct ALfontsound
*)LookupUIntMapKey(&device
->FontsoundMap
, id
); }
103 inline struct ALfontsound
*RemoveFontsound(ALCdevice
*device
, ALuint id
)
104 { return (struct ALfontsound
*)RemoveUIntMapKey(&device
->FontsoundMap
, id
); }
106 inline struct ALsfmodulator
*LookupModulator(ALfontsound
*sound
, ALuint id
)
107 { return (struct ALsfmodulator
*)LookupUIntMapKey(&sound
->ModulatorMap
, id
); }
108 inline struct ALsfmodulator
*RemoveModulator(ALfontsound
*sound
, ALuint id
)
109 { return (struct ALsfmodulator
*)RemoveUIntMapKey(&sound
->ModulatorMap
, id
); }
111 void ReleaseALFontsounds(ALCdevice
*device
);
114 typedef struct ALsfpreset
{
117 ALint Preset
; /* a.k.a. MIDI program number */
118 ALint Bank
; /* MIDI bank 0...127, or percussion (bank 128) */
120 ALfontsound
**Sounds
;
126 ALsfpreset
*NewPreset(ALCcontext
*context
);
127 void DeletePreset(ALsfpreset
*preset
, ALCdevice
*device
);
129 inline struct ALsfpreset
*LookupPreset(ALCdevice
*device
, ALuint id
)
130 { return (struct ALsfpreset
*)LookupUIntMapKey(&device
->PresetMap
, id
); }
131 inline struct ALsfpreset
*RemovePreset(ALCdevice
*device
, ALuint id
)
132 { return (struct ALsfpreset
*)RemoveUIntMapKey(&device
->PresetMap
, id
); }
134 void ReleaseALPresets(ALCdevice
*device
);
137 typedef struct ALsoundfont
{
140 ALsfpreset
**Presets
;
148 void ALsoundfont_Construct(ALsoundfont
*self
);
149 void ALsoundfont_Destruct(ALsoundfont
*self
);
150 ALsoundfont
*ALsoundfont_getDefSoundfont(ALCcontext
*context
);
151 void ALsoundfont_deleteSoundfont(ALsoundfont
*self
, ALCdevice
*device
);
153 inline struct ALsoundfont
*LookupSfont(ALCdevice
*device
, ALuint id
)
154 { return (struct ALsoundfont
*)LookupUIntMapKey(&device
->SfontMap
, id
); }
155 inline struct ALsoundfont
*RemoveSfont(ALCdevice
*device
, ALuint id
)
156 { return (struct ALsoundfont
*)RemoveUIntMapKey(&device
->SfontMap
, id
); }
158 void ReleaseALSoundfonts(ALCdevice
*device
);
164 #endif /* ALMIDI_H */