aboutsummaryrefslogtreecommitdiffstats
path: root/examples/alconvolve.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-10-12 06:42:32 -0700
committerChris Robinson <[email protected]>2023-10-12 06:42:32 -0700
commit5b86b80591ce85869716885ca393e080f6f72685 (patch)
tree73714ad6bdd3a2f0d76b4fe6fd6f8c85f79cf243 /examples/alconvolve.c
parentd1acb001a5c4779d382838fb02660ba9aa10e4cc (diff)
Rename the convolution reverb effect to just convolution
While the common use case, convolution can do more than just reverb, and it nicely shortens the name.
Diffstat (limited to 'examples/alconvolve.c')
-rw-r--r--examples/alconvolve.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/examples/alconvolve.c b/examples/alconvolve.c
index 94b978b5..8580d443 100644
--- a/examples/alconvolve.c
+++ b/examples/alconvolve.c
@@ -22,7 +22,7 @@
* THE SOFTWARE.
*/
-/* This file contains an example for applying convolution reverb to a source. */
+/* This file contains an example for applying convolution to a source. */
#include <assert.h>
#include <inttypes.h>
@@ -39,9 +39,9 @@
#include "common/alhelpers.h"
-#ifndef AL_SOFT_convolution_reverb
-#define AL_SOFT_convolution_reverb
-#define AL_EFFECT_CONVOLUTION_REVERB_SOFT 0xA000
+#ifndef AL_SOFT_convolution_effect
+#define AL_SOFT_convolution_effect
+#define AL_EFFECT_CONVOLUTION_SOFT 0xA000
#endif
@@ -278,19 +278,19 @@ static int UpdatePlayer(StreamPlayer *player)
}
-/* CreateEffect creates a new OpenAL effect object with a convolution reverb
- * type, and returns the new effect ID.
+/* CreateEffect creates a new OpenAL effect object with a convolution type, and
+ * returns the new effect ID.
*/
static ALuint CreateEffect(void)
{
ALuint effect = 0;
ALenum err;
- printf("Using Convolution Reverb\n");
+ printf("Using Convolution\n");
- /* Create the effect object and set the convolution reverb effect type. */
+ /* Create the effect object and set the convolution effect type. */
alGenEffects(1, &effect);
- alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_CONVOLUTION_REVERB_SOFT);
+ alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_CONVOLUTION_SOFT);
/* Check if an error occurred, and clean up if so. */
err = alGetError();
@@ -423,10 +423,10 @@ int main(int argc, char **argv)
if(InitAL(&argv, &argc) != 0)
return 1;
- if(!alIsExtensionPresent("AL_SOFTX_convolution_reverb"))
+ if(!alIsExtensionPresent("AL_SOFTX_convolution_effect"))
{
CloseAL();
- fprintf(stderr, "Error: Convolution revern not supported\n");
+ fprintf(stderr, "Error: Convolution effect not supported\n");
return 1;
}
@@ -500,11 +500,11 @@ int main(int argc, char **argv)
alGenAuxiliaryEffectSlots(1, &slot);
/* Set the impulse response sound buffer on the effect slot. This allows
- * effects to access it as needed. In this case, convolution reverb uses it
- * as the filter source. NOTE: Unlike the effect object, the buffer *is*
- * kept referenced and may not be changed or deleted as long as it's set,
- * just like with a source. When another buffer is set, or the effect slot
- * is deleted, the buffer reference is released.
+ * effects to access it as needed. In this case, convolution uses it as the
+ * filter source. NOTE: Unlike the effect object, the buffer *is* kept
+ * referenced and may not be changed or deleted as long as it's set, just
+ * like with a source. When another buffer is set, or the effect slot is
+ * deleted, the buffer reference is released.
*
* The effect slot's gain is reduced because the impulse responses I've
* tested with result in excessively loud reverb. Is that normal? Even with