Re: [AD] proposed changes to sound API

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


On Tue, Dec 16, 2008 at 11:08 PM, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> On 17-Dec-08, at 12:02 AM, Matthew Leverton wrote:
>> Is that to replace the current al_get_sample* or to supplement them?
>
> Opinions are divided on the subject. ;)
>
I don't think Allegro should pretend to be Java or some elaborate
object-oriented system.

bool playing;
if (al_get_sample_instance_bool(splinst, ALLEGRO_AUDIOPROP_PLAYING,
&playing) == 0 && playing == false)
{
  // sample instance is not playing
}

vs.

if (!al_is_sample_instance_playing(splinst))
{
  // sample instance is not playing
}

My vote is for the latter version because I don't see Allegro's audio
system ever getting much more advanced than it currently is.

However, if somebody is going to be adding dozens and dozens of minor
properties, then I think the current system is better equipped to
handle that. (But I'd still probably want functions for the major
properties anyway...)

--
Matthew Leverton




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