Re: [AD] enum moved to internal header

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


On 2010-05-05, Trent Gamblin <trent@xxxxxxxxxx> wrote:
> On Wed, May 5, 2010 6:45 pm, Peter Wang said:
> > On 2010-05-05, Trent Gamblin <trent@xxxxxxxxxx> wrote:
> >> Is there a good reason why the enum ALLEGRO_AUDIO_DRIVER_ENUM was
> >> moved from allegro5/allegro_audio.h to allegro5/internal/aintern_audio.h?
> >> These enum values allow you to specify which audio driver you want to use
> >> when calling al_install_audio.
> >
> > I removed the parameter to al_install_audio.
> > Is there some reason you need to specify it?
> 
> Possibly. On Linux you may want to choose OSS over ALSA or PulseAudio or
> in whatever configuration... On iPhone some may want to use OpenAL. Etc.

In Linux the choice should be up to the user, and they can set it for
all A5 programs by editing the config file.  On iPhone the developer can
(or should be able to) supply a config file.

Generally we want to move away from having the developer specifying
driver constants to functions.  In A4 we have problems with developers
unnecessarily hardcoding their games to use DirectX audio or whatnot.
On Linux I don't want someone hardcoding PulseAudio, because don't have
it installed.

Otherwise, if the developer wants to supply a driver selection screen
in-game, he can probably do it by setting a config value on the
structure returned by al_get_system_config(), then calling
al_install_audio().

Peter




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