allegro_flare
allegro_flare copied to clipboard
Consider creating PR for Allegro5 to add ALLEGRO_AUDIO_DEPTH_UNDEFINED
Currently the constants are defined here: https://github.com/liballeg/allegro5/blob/f818aee0ba95ecbf2c3caba8d6e56e594d66470b/addons/audio/allegro5/allegro_audio.h
Having an *_UNDEFINED for this enumeration (as well as several others), will allow objects to have default properties that are "not set" or "empty".
Also consider renaming ALLEGRO_AUDIO_VOICE, ALLEGRO_AUDIO_MIXER, constants from audio to ALLEGRO_AUDIO_VOICE, and ALLEGRO_AUDIO_MIXER.
use al_get_channel_count to replace logic code in this example: https://github.com/liballeg/allegro5/blob/d25c4cff7621db614e5236a1646f5d76309ca73f/examples/ex_synth.cpp#L156-L166
switch (al_get_mixer_channels(mixer)) {
case ALLEGRO_CHANNEL_CONF_1:
nch = 1;
break;
case ALLEGRO_CHANNEL_CONF_2:
nch = 2;
break;
default:
/* Not supported. */
return;
}