Re: [AD] proposed changes to sound API |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] proposed changes to sound API
- From: "Matthew Leverton" <meffer@xxxxxxxxxx>
- Date: Thu, 18 Dec 2008 19:05:11 -0600
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