[AD] A5 Audio API issues

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Couple of issues I think we should fix in the audio API:

1. API nomenclature:

a. Rename all things like al_load_sample_* to al_load_* to match the image addon nomenclature. I.e. al_load_wav, al_load_ogg_vorbis etc

b. Rename the stream loading functions to al_load_*_audio_stream to match the above fixes.

2. Provide file stream loading/saving functions

Right now all we have al_save_sample_wav_pf. We should have all the other ones though, again to mimic the image addon.

So, we'll have to add:
al_load_{formats}_stream
al_load_{formats}_audio_stream_stream <-- awkward, but that's how it is
al_save_wav_stream

3. Remove ALLEGRO_SAMPLE_ID, it's useless as is. Make al_play_sample return ALLEGRO_SAMPLE_INSTANCE* which ALLEGRO_SAMPLE_ID is a wrapper around anyway. This will allow the user to fiddle with the instance as much as he pleases and thus make the easy audio API just as functional as the 'hard' audio API. Remove al_stop_sample since it will now do nothing.

These are all simple suggestions that one can implement pretty easily, I think. Any comments on these? Also, about the API nomenclature, we should go through the API sometime soon and make sure it at least follows the proper al_verb_adjective_noun form.

-SiegeLord


      





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/