[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Monday 28 August 2006 14:32, Milan Mimica wrote:
> - a function to get audio driver was kind a missing so I added
> AL_AUDIO_DRIVER *al_get_audio_driver(int digi_driver);
Probably the best thing to do, IMO, would be to have:
AL_AUDIO_DRIVER **al_get_audio_driver_list();
which would make/return a NULL-terminated array of all existing audio drivers.
And then have:
AL_AUDIO_DRIVER *al_get_audio_driver(const char *name, AL_AUDIO_DRIVER
**list);
which would search the list for a driver with the specified name (if you pas
NULL, it would get the list automatically). So an example would be:
drv_list = al_get_audio_driver_list();
drv = al_get_audio_driver("alsa", drv_list);
if(!drv)
printf("No alsa driver!\n");
drv = al_init_audio_driver(drv);
if(!drv)
printf("Oops!\n");