Re: [AD] proposed changes to sound API

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


> Wouldn't it be better to have the reserved sample slot number given to
> al_install_audio, I'd imaging that al_install_audio would reserve a default
> number, then a call to reserve_sample_slots would change it for no good
> reason. imo, it'd be better to just tell the system how many you want, or -1
> (to use the default number) on init.
>
Originally I had it like that, but it creates a problem when using
your own mixer. If you reserve samples at initialization, then you
must create the default voice / mixer at that point. But if somebody
intends to set up his own voice and mixer, you've created default ones
for no good reason.

See the "Advanced Joe" example on the wiki page.

The point is, I don't see why there must be an all-or-nothing approach
with the "simple" layer. Just because you have one sample you may need
to adjust with the "advanced' settings (e.g., similar to an Allegro 4
"voice") doesn't mean you should have to give up the easy to use API
entirely.

> And this sample id thing, this is what voices in allegro 4 were. And is what I
> assume a ALLEGRO_VOICE is. Voice's are the playing instance, SAMPLEs are the
> loaded sound.
>
Allegro 4 voices aren't used like Allegro 5 voices. An Allegro 5 voice
is a link to the sound card. There's not much you can do with it,
except attach a sample, mixer, or stream to it. And in practice, I
assume the only thing anybody would ever do is attach a mixer to it.

--
Matthew Leverton




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