From s.tolstoyevski at gmail.com Fri Jul 2 17:49:01 2021 From: s.tolstoyevski at gmail.com (Sean) Date: Sat, 3 Jul 2021 00:49:01 +0300 Subject: [openal] [MATH] - A few questions about how I can rotate the listener? Message-ID: Hi again after a long time, I understand the atvector. But others are a bit complicated for me. I know these are all easy things. But it's hard to imagine, and I don't think my math background is that solid. And I guess not all of this is hand coded. Because it is prone to errors. Do you know of a library for C or C++ that makes these things easier (rotate vectors,  various degree calculation)? I'm talking about a trigonometry, or matrix library. Since my mail history has been deleted, I cannot quote old mails. But here is the link of the thread: https://openal.org/pipermail/openal/2021-March/000793.html From s.tolstoyevski at gmail.com Thu Jul 29 01:57:57 2021 From: s.tolstoyevski at gmail.com (Sean) Date: Thu, 29 Jul 2021 08:57:57 +0300 Subject: [openal] Is there a distinct difference between alcGetProcAddress and alGetProcAddress? Message-ID: Hello there, I know that ALC functions are all device specific. Each device supports different features, etc. However, when I examined the OpenAL-Soft source, I could not see any difference between the working logic of these 2 functions. In which cases should we prefer ALC? In which situations might ALC be used? For example, alcGetStringiSOFT works successfully with 2 functions. Thanks. From s.tolstoyevski at gmail.com Thu Jul 29 02:08:21 2021 From: s.tolstoyevski at gmail.com (Sean) Date: Thu, 29 Jul 2021 09:08:21 +0300 Subject: [openal] Where can I find the enum parameters that these functions accept: GetEffectf/fv-GetEffecti/iv GetFilteri/iv-GetFilterif/fv, GetAuxiliary... Message-ID: Hello there, I've been reviewing the OpenAL-Soft source for a long time. I couldn't find any parameters that these functions can accept. Looking at the overall code structure of OpenAL-Soft, *param* is evaluated in the switch statement. Like alGetSourcef. By examining these codes, I can tell if I'm doing the right things. But I couldn't find anything in the source code for effects, filters and AuxiliarySends. Where exactly are these defined in OpenAL-Soft? In particular, I cannot understand how vector functions work. The only way seems to be to inspect the source, as the documentation is missing. From chris.kcat at gmail.com Thu Jul 29 03:24:58 2021 From: chris.kcat at gmail.com (Chris Robinson) Date: Thu, 29 Jul 2021 00:24:58 -0700 Subject: [openal] Is there a distinct difference between alcGetProcAddress and alGetProcAddress? In-Reply-To: References: Message-ID: <20210729002458.3b853616@cathouse> On Thu, 29 Jul 2021 08:57:57 +0300 Sean wrote: > Hello there, > > I know that ALC functions are all device specific. Each device > supports different features, etc. > > However, when I examined the OpenAL-Soft source, I could not see any > difference between the working logic of these 2 functions. > > > In which cases should we prefer ALC? > In which situations might ALC be used? Hi. The spec isn't very detailed on the matter, but I would've thought alGetProcAddress would be used to get al* functions (which may or may not be context-dependent), and alcGetProcAddress would be used to get alc* functions (which may or may not be device-dependent). However, I ran into some code that expected to get alc functions from alGetProcAddress (or maybe the other way around? trying to get al functions from alcGetProcAddress), so it just made sense to make them the same. OpenAL Soft has no device- or context-specific functions, so there's no real reason to have separate lists. Note that on Windows with OpenAL Soft's router, the functions you get are at least driver-specific and can't be used between devices from different drivers (e.g. a function from alGetProcAddress on an OpenAL Soft device context, or from alcGerProcAddress with an OpenAL Soft device, can't be used with a Generic Software device or context). From chris.kcat at gmail.com Thu Jul 29 04:14:25 2021 From: chris.kcat at gmail.com (Chris Robinson) Date: Thu, 29 Jul 2021 01:14:25 -0700 Subject: [openal] Where can I find the enum parameters that these functions accept: GetEffectf/fv-GetEffecti/iv GetFilteri/iv-GetFilterif/fv, GetAuxiliary... In-Reply-To: References: Message-ID: <20210729011425.5285c233@cathouse> On Thu, 29 Jul 2021 09:08:21 +0300 Sean wrote: > Hello there, > > I've been reviewing the OpenAL-Soft source for a long time. > > I couldn't find any parameters that these functions can accept. This is detailed in the Effects Extension Guide PDF. It's part of the Core SDK download on openal.org, or if you don't have Windows to install it, it can be downloaded separately from here: https://openal-soft.org/misc-downloads/Effects%20Extension%20Guide.pdf > Looking at the overall code structure of OpenAL-Soft, *param* is > evaluated in the switch statement. > Like alGetSourcef. > > By examining these codes, I can tell if I'm doing the right things. > > But I couldn't find anything in the source code for effects, filters > and AuxiliarySends. > Where exactly are these defined in OpenAL-Soft? By default, the only parameter an effect can set is AL_EFFECT_TYPE, of which the available values are AL_EFFECT_NULL, AL_EFFECT_EAXREVERB, AL_EFFECT_REVERB, AL_EFFECT_CHORUS, and others. Which effects are available is implementation-dependent, so for example some may not allow you to set a Chorus effect if it's not implemented. OpenAL Soft supports all of those standard effect types. Once an effect type is set, then the alEffect* functions can accept other parameters relating to that effect. So if you call alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_EAXREVERB); and it succeeds, you can then call alEffectf(effect, AL_EAXREVERB_DENSITY, density); alEffectf(effect, AL_EAXREVERB_DIFFUSION, diffusion); ...etc... to set the reverb effect parameters. When you change the effect type, for example by calling alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_CHORUS); the reverb parameters are cleared and you can now set the chorus effect parameters: alEffecti(effect, AL_CHORUS_WAVEFORM, waveform); ...etc... The EFX-standard effect types, and their parameters, are described in the above-linked guide. OpenAL Soft comes with an efx-presets.h header, which defines a number of reverb presets that can be assigned to effects. Filters are similar. By default, only the AL_FILTER_TYPE property can be set, of which there's AL_FILTER_NULL, AL_FILTER_LOWPASS, AL_FILTER_HIGHPASS, and AL_FILTER_BANDPASS types. Set one of the filter types, then you can set that type's properties. The guide explains what properties are available for the different types. AuxiliaryEffectSlots are more typical objects, which have a set predefined number of properties that can be set. An effect can be set on one, and sources can be connected to one to have the given effect apply to the given sources. > In particular, I cannot understand how vector functions work. The vector functions are how properties that need multiple values can be given them. All single-value properties (e.g. AL_EFFECT_TYPE) can be set through the single-value or array/vector functions. For example, alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_EAXREVERB); // and ALint type[1] = { AL_EFFECT_EAXREVERB }; alEffectiv(effect, AL_EFFECT_TYPE, type); have the same result. However, some properties require multiple values and can only be used with the array/vector functions, like AL_EAXREVERB_REFLECTIONS_PAN which needs three values to specify a direction and magnitude: ALfloat pan[3] = { x, y, z }; alEffectfv(effect, AL_EAXREVERB_REFLECTIONS_PAN, pan); From s.tolstoyevski at gmail.com Sat Jul 31 01:26:14 2021 From: s.tolstoyevski at gmail.com (Sean) Date: Sat, 31 Jul 2021 08:26:14 +0300 Subject: [openal] Where can I find the enum parameters that these functions accept: GetEffectf/fv-GetEffecti/iv GetFilteri/iv-GetFilterif/fv, GetAuxiliary... In-Reply-To: <20210729011425.5285c233@cathouse> References: <20210729011425.5285c233@cathouse> Message-ID: <7dde8129-6454-1629-b3b4-c0746b3cdbc4@gmail.com> The SDK document is too old. No new enum parameters added to Effects? Thanks you for your detailed answer. On 29/07/2021 11:14, Chris Robinson wrote: > On Thu, 29 Jul 2021 09:08:21 +0300 > Sean wrote: > >> Hello there, >> >> I've been reviewing the OpenAL-Soft source for a long time. >> >> I couldn't find any parameters that these functions can accept. > This is detailed in the Effects Extension Guide PDF. It's part of the > Core SDK download on openal.org, or if you don't have Windows to > install it, it can be downloaded separately from here: > > https://openal-soft.org/misc-downloads/Effects%20Extension%20Guide.pdf > >> Looking at the overall code structure of OpenAL-Soft, *param* is >> evaluated in the switch statement. >> Like alGetSourcef. >> >> By examining these codes, I can tell if I'm doing the right things. >> >> But I couldn't find anything in the source code for effects, filters >> and AuxiliarySends. >> Where exactly are these defined in OpenAL-Soft? > By default, the only parameter an effect can set is AL_EFFECT_TYPE, of > which the available values are AL_EFFECT_NULL, AL_EFFECT_EAXREVERB, > AL_EFFECT_REVERB, AL_EFFECT_CHORUS, and others. Which effects are > available is implementation-dependent, so for example some may not allow > you to set a Chorus effect if it's not implemented. OpenAL Soft > supports all of those standard effect types. > > Once an effect type is set, then the alEffect* functions can accept > other parameters relating to that effect. So if you call > > alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_EAXREVERB); > > and it succeeds, you can then call > > alEffectf(effect, AL_EAXREVERB_DENSITY, density); > alEffectf(effect, AL_EAXREVERB_DIFFUSION, diffusion); > ...etc... > > to set the reverb effect parameters. When you change the effect type, > for example by calling > > alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_CHORUS); > > the reverb parameters are cleared and you can now set the chorus effect > parameters: > > alEffecti(effect, AL_CHORUS_WAVEFORM, waveform); > ...etc... > > The EFX-standard effect types, and their parameters, are described in > the above-linked guide. OpenAL Soft comes with an efx-presets.h header, > which defines a number of reverb presets that can be assigned to > effects. > > > Filters are similar. By default, only the AL_FILTER_TYPE property can > be set, of which there's AL_FILTER_NULL, AL_FILTER_LOWPASS, > AL_FILTER_HIGHPASS, and AL_FILTER_BANDPASS types. Set one of the filter > types, then you can set that type's properties. The guide explains what > properties are available for the different types. > > > AuxiliaryEffectSlots are more typical objects, which have a set > predefined number of properties that can be set. An effect can be set > on one, and sources can be connected to one to have the given effect > apply to the given sources. > >> In particular, I cannot understand how vector functions work. > The vector functions are how properties that need multiple values can > be given them. All single-value properties (e.g. AL_EFFECT_TYPE) can be > set through the single-value or array/vector functions. For example, > > alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_EAXREVERB); > // and > ALint type[1] = { AL_EFFECT_EAXREVERB }; > alEffectiv(effect, AL_EFFECT_TYPE, type); > > have the same result. However, some properties require multiple values > and can only be used with the array/vector functions, like > AL_EAXREVERB_REFLECTIONS_PAN which needs three values to specify a > direction and magnitude: > > ALfloat pan[3] = { x, y, z }; > alEffectfv(effect, AL_EAXREVERB_REFLECTIONS_PAN, pan); > _______________________________________________ > openal mailing list > openal at openal.org > http://openal.org/mailman/listinfo/openal