[Mplayer-cvslog] CVS: main/libao2 audio_out.c,1.2,1.3
Zoltan Ponekker
pontscho at users.sourceforge.net
Mon Jun 4 19:40:58 CEST 2001
Update of /cvsroot/mplayer/main/libao2
In directory usw-pr-cvs1:/tmp/cvs-serv14815
Modified Files:
audio_out.c
Log Message:
add alsa support by al3x
Index: audio_out.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/audio_out.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** audio_out.c 2001/06/03 10:48:36 1.2
--- audio_out.c 2001/06/04 17:40:56 1.3
***************
*** 1,3 ****
-
#include <stdio.h>
#include <stdlib.h>
--- 1,2 ----
***************
*** 7,10 ****
--- 6,11 ----
#include "audio_out.h"
+ #include <sys/soundcard.h> /* AFMT_* */
+
// there are some globals:
int ao_samplerate=0;
***************
*** 17,23 ****
extern ao_functions_t audio_out_oss;
//extern ao_functions_t audio_out_ossold;
- //extern ao_functions_t audio_out_alsa;
- //extern ao_functions_t audio_out_esd;
extern ao_functions_t audio_out_null;
#ifdef HAVE_SDL
extern ao_functions_t audio_out_sdl;
--- 18,25 ----
extern ao_functions_t audio_out_oss;
//extern ao_functions_t audio_out_ossold;
extern ao_functions_t audio_out_null;
+ extern ao_functions_t audio_out_alsa5;
+ extern ao_functions_t audio_out_alsa9;
+ extern ao_functions_t audio_out_esd;
#ifdef HAVE_SDL
extern ao_functions_t audio_out_sdl;
***************
*** 28,31 ****
--- 30,36 ----
&audio_out_oss,
&audio_out_null,
+ &audio_out_alsa5,
+ // &audio_out_alsa9,
+ // &audio_out_esd,
#ifdef HAVE_SDL
&audio_out_sdl,
***************
*** 34,35 ****
--- 39,59 ----
};
+ char *audio_out_format_name(int format)
+ {
+ switch (format)
+ {
+ case AFMT_S8:
+ return("signed 8-bit");
+ case AFMT_U8:
+ return("unsigned 8-bit");
+ case AFMT_U16_LE:
+ return("unsigned 16-bit (little-endian)");
+ case AFMT_U16_BE:
+ return("unsigned 16-bit (big-endian)");
+ case AFMT_S16_LE:
+ return("signed 16-bit (little-endian)");
+ case AFMT_S16_BE:
+ return("unsigned 16-bit (big-endian)");
+ }
+ return("unknown");
+ }
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
More information about the MPlayer-cvslog
mailing list