11 typedef struct ALsfmodulator
{
22 typedef struct ALenvelope
{
34 typedef struct ALfontsound
{
35 volatile RefCount ref
;
38 ALint MinVelocity
, MaxVelocity
;
41 ALint VibratoLfoToPitch
;
46 ALint ModLfoToFilterCutoff
;
47 ALint ModEnvToFilterCutoff
;
84 ALbyte PitchCorrection
;
86 struct ALfontsound
*Link
;
93 void ALfontsound_Destruct(ALfontsound
*self
);
94 void ALfontsound_setPropi(ALfontsound
*self
, ALCcontext
*context
, ALenum param
, ALint value
);
95 void ALfontsound_setModStagei(ALfontsound
*self
, ALCcontext
*context
, ALsizei stage
, ALenum param
, ALint value
);
97 ALfontsound
*NewFontsound(ALCcontext
*context
);
99 inline struct ALfontsound
*LookupFontsound(ALCdevice
*device
, ALuint id
)
100 { return (struct ALfontsound
*)LookupUIntMapKey(&device
->FontsoundMap
, id
); }
101 inline struct ALfontsound
*RemoveFontsound(ALCdevice
*device
, ALuint id
)
102 { return (struct ALfontsound
*)RemoveUIntMapKey(&device
->FontsoundMap
, id
); }
104 inline struct ALsfmodulator
*LookupModulator(ALfontsound
*sound
, ALuint id
)
105 { return (struct ALsfmodulator
*)LookupUIntMapKey(&sound
->ModulatorMap
, id
); }
106 inline struct ALsfmodulator
*RemoveModulator(ALfontsound
*sound
, ALuint id
)
107 { return (struct ALsfmodulator
*)RemoveUIntMapKey(&sound
->ModulatorMap
, id
); }
109 void ReleaseALFontsounds(ALCdevice
*device
);
112 typedef struct ALsfpreset
{
113 volatile RefCount ref
;
115 ALint Preset
; /* a.k.a. MIDI program number */
116 ALint Bank
; /* MIDI bank 0...127, or percussion (bank 128) */
118 ALfontsound
**Sounds
;
124 ALsfpreset
*NewPreset(ALCcontext
*context
);
125 void DeletePreset(ALsfpreset
*preset
, ALCdevice
*device
);
127 inline struct ALsfpreset
*LookupPreset(ALCdevice
*device
, ALuint id
)
128 { return (struct ALsfpreset
*)LookupUIntMapKey(&device
->PresetMap
, id
); }
129 inline struct ALsfpreset
*RemovePreset(ALCdevice
*device
, ALuint id
)
130 { return (struct ALsfpreset
*)RemoveUIntMapKey(&device
->PresetMap
, id
); }
132 void ReleaseALPresets(ALCdevice
*device
);
135 typedef struct ALsoundfont
{
136 volatile RefCount ref
;
138 ALsfpreset
**Presets
;
145 volatile ALenum Mapped
;
150 void ALsoundfont_Construct(ALsoundfont
*self
);
151 void ALsoundfont_Destruct(ALsoundfont
*self
);
152 ALsoundfont
*ALsoundfont_getDefSoundfont(ALCcontext
*context
);
153 void ALsoundfont_deleteSoundfont(ALsoundfont
*self
, ALCdevice
*device
);
155 inline struct ALsoundfont
*LookupSfont(ALCdevice
*device
, ALuint id
)
156 { return (struct ALsoundfont
*)LookupUIntMapKey(&device
->SfontMap
, id
); }
157 inline struct ALsoundfont
*RemoveSfont(ALCdevice
*device
, ALuint id
)
158 { return (struct ALsoundfont
*)RemoveUIntMapKey(&device
->SfontMap
, id
); }
160 void ReleaseALSoundfonts(ALCdevice
*device
);
166 #endif /* ALMIDI_H */