Re: [AD] proposed changes to sound API

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


On December 18, 2008, Matthew Leverton wrote:
> 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.

I can't imagine that search becoming a problem. At most there'll be tens of 
instances. And something makes me think with more than "tens" of instances, 
most people will want to stop all of them at once. (a user would probably get 
so frustrated with the NOISE that they kill the app ;D)

> --
> Matthew Leverton
>
> ---------------------------------------------------------------------------
>--- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
> Nevada. The future of the web can't happen without you.  Join us at MIX09
> to help pave the way to the Next Web now. Learn more and register at
> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com
>/


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




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