Re: [AD] proposed changes to sound API

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


On 2008-12-18, Matthew Leverton <meffer@xxxxxxxxxx> wrote:
> 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.

I don't like the .error field.  Why not change al_play_sample() to one
of the following:

1. ALLEGRO_SAMPLE_ID al_play_sample(ALLEGRO_SAMPLE *sample, float gain,
	float pan, float speed, ALLEGRO_PLAYMODE playmode,
	bool *ret_error);

2. bool al_play_sample(ALLEGRO_SAMPLE *sample, float gain,
	float pan, float speed, ALLEGRO_PLAYMODE playmode,
	ALLEGRO_SAMPLE_ID *ret_sample_id);

In either case the user can pass NULL for the ret_ parameter if he
doesn't care.

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

You have commit access.

Peter





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