Re: [AD] proposed changes to sound API

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


On Tue, Dec 16, 2008 at 4:39 PM, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
> 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'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.

It is used to stop a specific sample that was started via
al_play_sample(). So if you play the same sample multiple times
concurrently, it will only stop the specific one. It also has an id to
uniquely identify the sample, so that if another sample has taken over
the same slot, it won't accidentally be stopped.

Example:

ALLEGRO_SAMPLE_ID spl_id = al_play_sample(spl, ...);
if (!spl_id.error)
{
  al_stop_sample(spl_id); // guaranteed to only stop the sample started above.
}

~

Also, I ported A4 load_wav and inserted it directly into acodec. Does
A5 have any big/little endian file i/o like the A4 packfiles? I just
wrote a couple of macros to read little endian.

Comments? I can commit what I've got once there is some consensus. [Do
I have commit access to 4.9?]

--
Matthew Leverton




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