summaryrefslogtreecommitdiffstats
path: root/libao2
diff options
context:
space:
mode:
Diffstat (limited to 'libao2')
-rw-r--r--libao2/ao_sdl.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c
index 643c5cfa80..2126c0d0ff 100644
--- a/libao2/ao_sdl.c
+++ b/libao2/ao_sdl.c
@@ -38,8 +38,6 @@ LIBAO_EXTERN(sdl)
// ao_buffersize
extern int verbose;
-/* audio driver to be used by SDLlib */
-char *sdl_adriver;
// Samplesize used by the SDLlib AudioSpec struct
#define SAMPLESIZE 1024
@@ -152,11 +150,10 @@ static int init(int rate,int channels,int format,int flags){
printf("SDL: Samplerate: %iHz Channels: %s Format %s\n", rate, (channels > 1) ? "Stereo" : "Mono", audio_out_format_name(format));
- if(sdl_adriver) {
- setenv("SDL_AUDIODRIVER", sdl_adriver, 1);
- printf("SDL: using %s audio driver\n", sdl_adriver);
- }
-
+ if(ao_subdevice) {
+ setenv("SDL_AUDIODRIVER", ao_subdevice, 1);
+ printf("SDL: using %s audio driver\n", ao_subdevice);
+ }
/* The desired audio format (see SDL_AudioSpec) */
switch(format) {