[AD] proposed changes to sound API

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


Before I submit any smaller patches, I'd like to propose some bigger
changes to the sound API.

http://wiki.allegro.cc/NewAPI/Sound/Proposed

I don't like how the "simple" layer is made to be an all/or nothing
thing. If the regular API is too difficult, then it is designed wrong.
The changes I'm proposing would remove the distinction between the two
layers while keeping the current behavior almost the same. In short:

* Rename al_setup_simple_audio() to al_reserve_sample_slots().

* Provide methods to get/set the default mixer.

* Rename ALLEGRO_SAMPLE to ALLEGRO_SAMPLE_PLAYER

* Rename ALLEGRO_SAMPLE_DATA to ALLEGRO_SAMPLE

* Support WAV files out of the box.

The average user would just reserve somes slots and use al_play_sample().

If you need more than that, you could install your own voice and
mixer, set it as the default, then reserve some sample slots. Thus,
you can still use al_play_sample() for your basic samples, and set up
an ALLEGRO_SAMPLE_PLAYER for each of your samples that have more
complex parameters.

--
Matthew Leverton




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