179 |
libao_register(char *options) |
libao_register(char *options) |
180 |
{ |
{ |
181 |
static struct audio_driver libao_driver; |
static struct audio_driver libao_driver; |
|
struct ao_info *libao_info; |
|
|
static char description[101]; |
|
182 |
|
|
183 |
libao_driver.wave_out_open = libao_open; |
libao_driver.wave_out_open = libao_open; |
184 |
libao_driver.wave_out_close = libao_close; |
libao_driver.wave_out_close = libao_close; |
187 |
libao_driver.wave_out_volume = rdpsnd_dsp_softvol_set; |
libao_driver.wave_out_volume = rdpsnd_dsp_softvol_set; |
188 |
libao_driver.wave_out_play = libao_play; |
libao_driver.wave_out_play = libao_play; |
189 |
libao_driver.name = xstrdup("libao"); |
libao_driver.name = xstrdup("libao"); |
190 |
libao_driver.description = description; |
libao_driver.description = xstrdup("libao output driver, default device: system dependent"); |
191 |
libao_driver.need_byteswap_on_be = 1; |
libao_driver.need_byteswap_on_be = 1; |
192 |
libao_driver.need_resampling = 1; |
libao_driver.need_resampling = 1; |
193 |
libao_driver.next = NULL; |
libao_driver.next = NULL; |
194 |
|
|
|
ao_initialize(); |
|
|
|
|
|
libao_info = ao_driver_info(ao_default_driver_id()); |
|
|
|
|
|
if (libao_info) |
|
|
{ |
|
|
snprintf(description, 100, "libao output driver, default device: %s", |
|
|
libao_info->short_name); |
|
|
} |
|
|
else |
|
|
{ |
|
|
snprintf(description, 100, "libao output driver, default device: none"); |
|
|
} |
|
|
|
|
|
ao_shutdown(); |
|
|
|
|
195 |
if (options) |
if (options) |
196 |
{ |
{ |
197 |
libao_device = xstrdup(options); |
libao_device = xstrdup(options); |