Re: [AD] proposed changes to sound API

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


On Thu, Dec 18, 2008 at 6:40 PM, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
> I've updated the document to reflect how I've changed kcm_audio. I
> think the only thing that is a little crazy is ALLEGRO_SAMPLE_ID.
>
I forgot to mention: Internally, there is a number that is incremented
every time a sample is played via al_play_sample(). So instead of the
whole ALLEGRO_SAMPLE_ID thing, that id could be returned instead (0 on
error).

The only downside is that stopping the sample via al_stop_sample()
would mean a linear search over the vector of ids to find which slot
it belongs to, but I prefer it over the custom struct.

--
Matthew Leverton




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