Skip to content

Add some prefabricated sound effects #1590

Open
@SiegeLord

Description

The mixer has al_set_mixer_postprocess_callback function. We should provide a bunch of pre-made effects. An API could be:

ALLEGRO_DELAY_AUDIO_EFFECT *al_create_delay_audio_effect(delay_secs, channel_conf, channel_depth, frequency);
pp_callback_t al_get_audio_effect_callback(ALLEGRO_DELAY_EFFECT *effect);
al_destroy_audio_effect(ALLEGRO_DELAY_EFFECT *effect);

And then you use it as:

auto effect = al_create_delay_audio_effect(0.5, al_get_mixer_channels(mixer), al_get_mixer_depth(mixer), al_get_mixer_frequency(mixer));
al_set_mixer_postprocess_callback(mixer, al_get_audio_effect_callback(effect), effect);

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions