diff options
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r-- | OpenAL32/Include/alMain.h | 214 | ||||
-rw-r--r-- | OpenAL32/Include/alMidi.h | 173 |
2 files changed, 0 insertions, 387 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index e7ca5ac7..214047ee 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -61,205 +61,6 @@ ALC_API ALCboolean ALC_APIENTRY alcResetDeviceSOFT(ALCdevice *device, const ALCi #endif #endif -#ifndef ALC_SOFT_midi_interface -#define ALC_SOFT_midi_interface 1 -/* Global properties */ -#define AL_MIDI_CLOCK_SOFT 0x9999 -#define AL_MIDI_STATE_SOFT 0x9986 -#define AL_MIDI_GAIN_SOFT 0x9998 -#define AL_SOUNDFONTS_SIZE_SOFT 0x9995 -#define AL_SOUNDFONTS_SOFT 0x9994 - -/* Soundfont properties */ -#define AL_PRESETS_SIZE_SOFT 0x9993 -#define AL_PRESETS_SOFT 0x9992 - -/* Preset properties */ -#define AL_MIDI_PRESET_SOFT 0x9997 -#define AL_MIDI_BANK_SOFT 0x9996 -#define AL_FONTSOUNDS_SIZE_SOFT 0x9991 -#define AL_FONTSOUNDS_SOFT 0x9990 - -/* Fontsound properties */ -/* AL_BUFFER */ -#define AL_SAMPLE_START_SOFT 0x2000 -#define AL_SAMPLE_END_SOFT 0x2001 -#define AL_SAMPLE_LOOP_START_SOFT 0x2002 -#define AL_SAMPLE_LOOP_END_SOFT 0x2003 -#define AL_SAMPLE_RATE_SOFT 0x2004 -#define AL_BASE_KEY_SOFT 0x2005 -#define AL_KEY_CORRECTION_SOFT 0x2006 -#define AL_SAMPLE_TYPE_SOFT 0x2007 -#define AL_FONTSOUND_LINK_SOFT 0x2008 -#define AL_MOD_LFO_TO_PITCH_SOFT 0x0005 -#define AL_VIBRATO_LFO_TO_PITCH_SOFT 0x0006 -#define AL_MOD_ENV_TO_PITCH_SOFT 0x0007 -#define AL_FILTER_CUTOFF_SOFT 0x0008 -#define AL_FILTER_RESONANCE_SOFT 0x0009 -#define AL_MOD_LFO_TO_FILTER_CUTOFF_SOFT 0x000A -#define AL_MOD_ENV_TO_FILTER_CUTOFF_SOFT 0x000B -#define AL_MOD_LFO_TO_VOLUME_SOFT 0x000D -#define AL_CHORUS_SEND_SOFT 0x000F -#define AL_REVERB_SEND_SOFT 0x0010 -#define AL_PAN_SOFT 0x0011 -#define AL_MOD_LFO_DELAY_SOFT 0x0015 -#define AL_MOD_LFO_FREQUENCY_SOFT 0x0016 -#define AL_VIBRATO_LFO_DELAY_SOFT 0x0017 -#define AL_VIBRATO_LFO_FREQUENCY_SOFT 0x0018 -#define AL_MOD_ENV_DELAYTIME_SOFT 0x0019 -#define AL_MOD_ENV_ATTACKTIME_SOFT 0x001A -#define AL_MOD_ENV_HOLDTIME_SOFT 0x001B -#define AL_MOD_ENV_DECAYTIME_SOFT 0x001C -#define AL_MOD_ENV_SUSTAINVOLUME_SOFT 0x001D -#define AL_MOD_ENV_RELEASETIME_SOFT 0x002E -#define AL_MOD_ENV_KEY_TO_HOLDTIME_SOFT 0x001F -#define AL_MOD_ENV_KEY_TO_DECAYTIME_SOFT 0x0020 -#define AL_VOLUME_ENV_DELAYTIME_SOFT 0x0021 -#define AL_VOLUME_ENV_ATTACKTIME_SOFT 0x0022 -#define AL_VOLUME_ENV_HOLDTIME_SOFT 0x0023 -#define AL_VOLUME_ENV_DECAYTIME_SOFT 0x0024 -#define AL_VOLUME_ENV_SUSTAINVOLUME_SOFT 0x0025 -#define AL_VOLUME_ENV_RELEASETIME_SOFT 0x0026 -#define AL_VOLUME_ENV_KEY_TO_HOLDTIME_SOFT 0x0027 -#define AL_VOLUME_ENV_KEY_TO_DECAYTIME_SOFT 0x0028 -#define AL_KEY_RANGE_SOFT 0x002B -#define AL_VELOCITY_RANGE_SOFT 0x002C -#define AL_ATTENUATION_SOFT 0x0030 -#define AL_TUNING_COARSE_SOFT 0x0033 -#define AL_TUNING_FINE_SOFT 0x0034 -#define AL_LOOP_MODE_SOFT 0x0036 -#define AL_TUNING_SCALE_SOFT 0x0038 -#define AL_EXCLUSIVE_CLASS_SOFT 0x0039 - -/* Sample Types */ -/* AL_MONO_SOFT */ -#define AL_RIGHT_SOFT 0x0002 -#define AL_LEFT_SOFT 0x0004 - -/* Loop Modes */ -/* AL_NONE */ -#define AL_LOOP_CONTINUOUS_SOFT 0x0001 -#define AL_LOOP_UNTIL_RELEASE_SOFT 0x0003 - -/* Fontsound modulator stage properties */ -#define AL_SOURCE0_INPUT_SOFT 0x998F -#define AL_SOURCE0_TYPE_SOFT 0x998E -#define AL_SOURCE0_FORM_SOFT 0x998D -#define AL_SOURCE1_INPUT_SOFT 0x998C -#define AL_SOURCE1_TYPE_SOFT 0x998B -#define AL_SOURCE1_FORM_SOFT 0x998A -#define AL_AMOUNT_SOFT 0x9989 -#define AL_TRANSFORM_OP_SOFT 0x9988 -#define AL_DESTINATION_SOFT 0x9987 - -/* Sounce Inputs */ -#define AL_ONE_SOFT 0x0080 -#define AL_NOTEON_VELOCITY_SOFT 0x0082 -#define AL_NOTEON_KEY_SOFT 0x0083 -/* AL_KEYPRESSURE_SOFT */ -/* AL_CHANNELPRESSURE_SOFT */ -/* AL_PITCHBEND_SOFT */ -#define AL_PITCHBEND_SENSITIVITY_SOFT 0x0090 -/* CC 0...127 */ - -/* Source Types */ -#define AL_UNORM_SOFT 0x0000 -#define AL_UNORM_REV_SOFT 0x0100 -#define AL_SNORM_SOFT 0x0200 -#define AL_SNORM_REV_SOFT 0x0300 - -/* Source Forms */ -#define AL_LINEAR_SOFT 0x0000 -#define AL_CONCAVE_SOFT 0x0400 -#define AL_CONVEX_SOFT 0x0800 -#define AL_SWITCH_SOFT 0x0C00 - -/* Transform Ops */ -/* AL_LINEAR_SOFT */ -#define AL_ABSOLUTE_SOFT 0x0002 - -/* Events */ -#define AL_NOTEOFF_SOFT 0x0080 -#define AL_NOTEON_SOFT 0x0090 -#define AL_KEYPRESSURE_SOFT 0x00A0 -#define AL_CONTROLLERCHANGE_SOFT 0x00B0 -#define AL_PROGRAMCHANGE_SOFT 0x00C0 -#define AL_CHANNELPRESSURE_SOFT 0x00D0 -#define AL_PITCHBEND_SOFT 0x00E0 - -typedef void (AL_APIENTRY*LPALGENSOUNDFONTSSOFT)(ALsizei n, ALuint *ids); -typedef void (AL_APIENTRY*LPALDELETESOUNDFONTSSOFT)(ALsizei n, const ALuint *ids); -typedef ALboolean (AL_APIENTRY*LPALISSOUNDFONTSOFT)(ALuint id); -typedef void (AL_APIENTRY*LPALGETSOUNDFONTIVSOFT)(ALuint id, ALenum param, ALint *values); -typedef void (AL_APIENTRY*LPALSOUNDFONTPRESETSSOFT)(ALuint id, ALsizei count, const ALuint *pids); -typedef void (AL_APIENTRY*LPALGENPRESETSSOFT)(ALsizei n, ALuint *ids); -typedef void (AL_APIENTRY*LPALDELETEPRESETSSOFT)(ALsizei n, const ALuint *ids); -typedef ALboolean (AL_APIENTRY*LPALISPRESETSOFT)(ALuint id); -typedef void (AL_APIENTRY*LPALPRESETISOFT)(ALuint id, ALenum param, ALint value); -typedef void (AL_APIENTRY*LPALPRESETIVSOFT)(ALuint id, ALenum param, const ALint *values); -typedef void (AL_APIENTRY*LPALPRESETFONTSOUNDSSOFT)(ALuint id, ALsizei count, const ALuint *fsids); -typedef void (AL_APIENTRY*LPALGETPRESETIVSOFT)(ALuint id, ALenum param, ALint *values); -typedef void (AL_APIENTRY*LPALGENFONTSOUNDSSOFT)(ALsizei n, ALuint *ids); -typedef void (AL_APIENTRY*LPALDELETEFONTSOUNDSSOFT)(ALsizei n, const ALuint *ids); -typedef ALboolean (AL_APIENTRY*LPALISFONTSOUNDSOFT)(ALuint id); -typedef void (AL_APIENTRY*LPALFONTSOUNDISOFT)(ALuint id, ALenum param, ALint value); -typedef void (AL_APIENTRY*LPALFONTSOUND2ISOFT)(ALuint id, ALenum param, ALint value1, ALint value2); -typedef void (AL_APIENTRY*LPALFONTSOUNDIVSOFT)(ALuint id, ALenum param, const ALint *values); -typedef void (AL_APIENTRY*LPALGETFONTSOUNDIVSOFT)(ALuint id, ALenum param, ALint *values); -typedef void (AL_APIENTRY*LPALFONTSOUNDMOFULATORISOFT)(ALuint id, ALsizei stage, ALenum param, ALint value); -typedef void (AL_APIENTRY*LPALGETFONTSOUNDMODULATORIVSOFT)(ALuint id, ALsizei stage, ALenum param, ALint *values); -typedef void (AL_APIENTRY*LPALMIDISOUNDFONTSOFT)(ALuint id); -typedef void (AL_APIENTRY*LPALMIDISOUNDFONTVSOFT)(ALsizei count, const ALuint *ids); -typedef void (AL_APIENTRY*LPALMIDIEVENTSOFT)(ALuint64SOFT time, ALenum event, ALsizei channel, ALsizei param1, ALsizei param2); -typedef void (AL_APIENTRY*LPALMIDISYSEXSOFT)(ALuint64SOFT time, const ALbyte *data, ALsizei size); -typedef void (AL_APIENTRY*LPALMIDIPLAYSOFT)(void); -typedef void (AL_APIENTRY*LPALMIDIPAUSESOFT)(void); -typedef void (AL_APIENTRY*LPALMIDISTOPSOFT)(void); -typedef void (AL_APIENTRY*LPALMIDIRESETSOFT)(void); -typedef void (AL_APIENTRY*LPALMIDIGAINSOFT)(ALfloat value); -typedef ALint64SOFT (AL_APIENTRY*LPALGETINTEGER64SOFT)(ALenum pname); -typedef void (AL_APIENTRY*LPALGETINTEGER64VSOFT)(ALenum pname, ALint64SOFT *values); -typedef void (AL_APIENTRY*LPALLOADSOUNDFONTSOFT)(ALuint id, size_t(*cb)(ALvoid*,size_t,ALvoid*), ALvoid *user); -#ifdef AL_ALEXT_PROTOTYPES -AL_API void AL_APIENTRY alGenSoundfontsSOFT(ALsizei n, ALuint *ids); -AL_API void AL_APIENTRY alDeleteSoundfontsSOFT(ALsizei n, const ALuint *ids); -AL_API ALboolean AL_APIENTRY alIsSoundfontSOFT(ALuint id); -AL_API void AL_APIENTRY alGetSoundfontivSOFT(ALuint id, ALenum param, ALint *values); -AL_API void AL_APIENTRY alSoundfontPresetsSOFT(ALuint id, ALsizei count, const ALuint *pids); - -AL_API void AL_APIENTRY alGenPresetsSOFT(ALsizei n, ALuint *ids); -AL_API void AL_APIENTRY alDeletePresetsSOFT(ALsizei n, const ALuint *ids); -AL_API ALboolean AL_APIENTRY alIsPresetSOFT(ALuint id); -AL_API void AL_APIENTRY alPresetiSOFT(ALuint id, ALenum param, ALint value); -AL_API void AL_APIENTRY alPresetivSOFT(ALuint id, ALenum param, const ALint *values); -AL_API void AL_APIENTRY alGetPresetivSOFT(ALuint id, ALenum param, ALint *values); -AL_API void AL_APIENTRY alPresetFontsoundsSOFT(ALuint id, ALsizei count, const ALuint *fsids); - -AL_API void AL_APIENTRY alGenFontsoundsSOFT(ALsizei n, ALuint *ids); -AL_API void AL_APIENTRY alDeleteFontsoundsSOFT(ALsizei n, const ALuint *ids); -AL_API ALboolean AL_APIENTRY alIsFontsoundSOFT(ALuint id); -AL_API void AL_APIENTRY alFontsoundiSOFT(ALuint id, ALenum param, ALint value); -AL_API void AL_APIENTRY alFontsound2iSOFT(ALuint id, ALenum param, ALint value1, ALint value2); -AL_API void AL_APIENTRY alFontsoundivSOFT(ALuint id, ALenum param, const ALint *values); -AL_API void AL_APIENTRY alGetFontsoundivSOFT(ALuint id, ALenum param, ALint *values); -AL_API void AL_APIENTRY alFontsoundModulatoriSOFT(ALuint id, ALsizei stage, ALenum param, ALint value); -AL_API void AL_APIENTRY alGetFontsoundModulatorivSOFT(ALuint id, ALsizei stage, ALenum param, ALint *values); - -AL_API void AL_APIENTRY alMidiSoundfontSOFT(ALuint id); -AL_API void AL_APIENTRY alMidiSoundfontvSOFT(ALsizei count, const ALuint *ids); -AL_API void AL_APIENTRY alMidiEventSOFT(ALuint64SOFT time, ALenum event, ALsizei channel, ALsizei param1, ALsizei param2); -AL_API void AL_APIENTRY alMidiSysExSOFT(ALuint64SOFT time, const ALbyte *data, ALsizei size); -AL_API void AL_APIENTRY alMidiPlaySOFT(void); -AL_API void AL_APIENTRY alMidiPauseSOFT(void); -AL_API void AL_APIENTRY alMidiStopSOFT(void); -AL_API void AL_APIENTRY alMidiResetSOFT(void); -AL_API void AL_APIENTRY alMidiGainSOFT(ALfloat value); -AL_API ALint64SOFT AL_APIENTRY alGetInteger64SOFT(ALenum pname); -AL_API void AL_APIENTRY alGetInteger64vSOFT(ALenum pname, ALint64SOFT *values); -AL_API void AL_APIENTRY alLoadSoundfontSOFT(ALuint id, size_t(*cb)(ALvoid*,size_t,ALvoid*), ALvoid *user); -#endif -#endif - #ifndef ALC_SOFT_device_clock #define ALC_SOFT_device_clock 1 typedef int64_t ALCint64SOFT; @@ -677,21 +478,6 @@ struct ALCdevice_struct // Map of Filters for this device UIntMap FilterMap; - // Map of Soundfonts for this device - UIntMap SfontMap; - - // Map of Presets for this device - UIntMap PresetMap; - - // Map of Fontsounds for this device - UIntMap FontsoundMap; - - /* Default soundfont (accessible as ID 0) */ - struct ALsoundfont *DefaultSfont; - - /* MIDI synth engine */ - struct MidiSynth *Synth; - /* HRTF filter tables */ vector_HrtfEntry Hrtf_List; al_string Hrtf_Name; diff --git a/OpenAL32/Include/alMidi.h b/OpenAL32/Include/alMidi.h deleted file mode 100644 index b1c08e40..00000000 --- a/OpenAL32/Include/alMidi.h +++ /dev/null @@ -1,173 +0,0 @@ -#ifndef ALMIDI_H -#define ALMIDI_H - -#include "alMain.h" -#include "atomic.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct ALsfmodulator { - struct { - ALenum Input; - ALenum Type; - ALenum Form; - } Source[2]; - ALint Amount; - ALenum TransformOp; - ALenum Dest; -} ALsfmodulator; - -typedef struct ALenvelope { - ALint DelayTime; - ALint AttackTime; - ALint HoldTime; - ALint DecayTime; - ALint SustainAttn; - ALint ReleaseTime; - ALint KeyToHoldTime; - ALint KeyToDecayTime; -} ALenvelope; - - -typedef struct ALfontsound { - RefCount ref; - - ATOMIC(struct ALbuffer*) Buffer; - - ALint MinKey, MaxKey; - ALint MinVelocity, MaxVelocity; - - ALint ModLfoToPitch; - ALint VibratoLfoToPitch; - ALint ModEnvToPitch; - - ALint FilterCutoff; - ALint FilterQ; - ALint ModLfoToFilterCutoff; - ALint ModEnvToFilterCutoff; - ALint ModLfoToVolume; - - ALint ChorusSend; - ALint ReverbSend; - - ALint Pan; - - struct { - ALint Delay; - ALint Frequency; - } ModLfo; - struct { - ALint Delay; - ALint Frequency; - } VibratoLfo; - - ALenvelope ModEnv; - ALenvelope VolEnv; - - ALint Attenuation; - - ALint CoarseTuning; - ALint FineTuning; - - ALenum LoopMode; - - ALint TuningScale; - - ALint ExclusiveClass; - - ALuint Start; - ALuint End; - ALuint LoopStart; - ALuint LoopEnd; - ALuint SampleRate; - ALubyte PitchKey; - ALbyte PitchCorrection; - ALenum SampleType; - - ATOMIC(struct ALfontsound*) Link; - - /* NOTE: Each map entry contains *four* (4) ALsfmodulator objects. */ - UIntMap ModulatorMap; - - ALuint id; -} ALfontsound; - -void ALfontsound_setPropi(ALfontsound *self, ALCcontext *context, ALenum param, ALint value); -void ALfontsound_setModStagei(ALfontsound *self, ALCcontext *context, ALsizei stage, ALenum param, ALint value); - -ALfontsound *NewFontsound(ALCcontext *context); -void DeleteFontsound(ALCdevice *device, ALfontsound *sound); - -inline struct ALfontsound *LookupFontsound(ALCdevice *device, ALuint id) -{ return (struct ALfontsound*)LookupUIntMapKey(&device->FontsoundMap, id); } -inline struct ALfontsound *RemoveFontsound(ALCdevice *device, ALuint id) -{ return (struct ALfontsound*)RemoveUIntMapKey(&device->FontsoundMap, id); } - -void ReleaseALFontsounds(ALCdevice *device); - - -typedef struct ALsfpreset { - RefCount ref; - - ALint Preset; /* a.k.a. MIDI program number */ - ALint Bank; /* MIDI bank 0...127, or percussion (bank 128) */ - - ALfontsound **Sounds; - ALsizei NumSounds; - - ALuint id; -} ALsfpreset; - -ALsfpreset *NewPreset(ALCcontext *context); -void DeletePreset(ALCdevice *device, ALsfpreset *preset); - -inline struct ALsfpreset *LookupPreset(ALCdevice *device, ALuint id) -{ return (struct ALsfpreset*)LookupUIntMapKey(&device->PresetMap, id); } -inline struct ALsfpreset *RemovePreset(ALCdevice *device, ALuint id) -{ return (struct ALsfpreset*)RemoveUIntMapKey(&device->PresetMap, id); } - -void ReleaseALPresets(ALCdevice *device); - - -typedef struct ALsoundfont { - RefCount ref; - - ALsfpreset **Presets; - ALsizei NumPresets; - - RWLock Lock; - - ALuint id; -} ALsoundfont; - -ALsoundfont *ALsoundfont_getDefSoundfont(ALCcontext *context); -void ALsoundfont_deleteSoundfont(ALsoundfont *self, ALCdevice *device); - -inline struct ALsoundfont *LookupSfont(ALCdevice *device, ALuint id) -{ return (struct ALsoundfont*)LookupUIntMapKey(&device->SfontMap, id); } -inline struct ALsoundfont *RemoveSfont(ALCdevice *device, ALuint id) -{ return (struct ALsoundfont*)RemoveUIntMapKey(&device->SfontMap, id); } - -void ReleaseALSoundfonts(ALCdevice *device); - - -inline ALboolean IsValidCtrlInput(int cc) -{ - /* These correspond to MIDI functions, not real controller values. */ - if(cc == 0 || cc == 6 || cc == 32 || cc == 38 || (cc >= 98 && cc <= 101) || cc >= 120) - return AL_FALSE; - /* These are the LSB components of CC0...CC31, which are automatically used when - * reading the MSB controller value. */ - if(cc >= 32 && cc <= 63) - return AL_FALSE; - /* All the rest are okay! */ - return AL_TRUE; -} - -#ifdef __cplusplus -} -#endif - -#endif /* ALMIDI_H */ |