Mercurial > mplayer.hg
annotate libao2/audio_out.c @ 1009:c51d7e4853d6
finished .asf seeking
author | arpi_esp |
---|---|
date | Mon, 04 Jun 2001 19:30:24 +0000 |
parents | e2de3386725f |
children | e34336f4feaf |
rev | line source |
---|---|
954 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
3 | |
4 #include "../config.h" | |
5 | |
6 #include "audio_out.h" | |
7 | |
995 | 8 #include <sys/soundcard.h> /* AFMT_* */ |
9 | |
954 | 10 // there are some globals: |
11 int ao_samplerate=0; | |
12 int ao_channels=0; | |
13 int ao_format=0; | |
14 int ao_bps=0; | |
15 int ao_outburst=OUTBURST; // config.h default | |
16 int ao_buffersize=-1; | |
17 | |
18 extern ao_functions_t audio_out_oss; | |
19 //extern ao_functions_t audio_out_ossold; | |
20 extern ao_functions_t audio_out_null; | |
1007 | 21 #ifdef HAVE_ALSA5 |
22 extern ao_functions_t audio_out_alsa5; | |
23 #endif | |
24 //extern ao_functions_t audio_out_alsa9; | |
995 | 25 extern ao_functions_t audio_out_esd; |
966
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
26 #ifdef HAVE_SDL |
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
27 extern ao_functions_t audio_out_sdl; |
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
28 #endif |
954 | 29 |
30 ao_functions_t* audio_out_drivers[] = | |
31 { | |
32 &audio_out_oss, | |
33 &audio_out_null, | |
1007 | 34 #ifdef HAVE_ALSA5 |
995 | 35 &audio_out_alsa5, |
1007 | 36 #endif |
995 | 37 // &audio_out_alsa9, |
38 // &audio_out_esd, | |
966
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
39 #ifdef HAVE_SDL |
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
40 &audio_out_sdl, |
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
41 #endif |
954 | 42 NULL |
43 }; | |
44 | |
995 | 45 char *audio_out_format_name(int format) |
46 { | |
47 switch (format) | |
48 { | |
49 case AFMT_S8: | |
50 return("signed 8-bit"); | |
51 case AFMT_U8: | |
52 return("unsigned 8-bit"); | |
53 case AFMT_U16_LE: | |
54 return("unsigned 16-bit (little-endian)"); | |
55 case AFMT_U16_BE: | |
56 return("unsigned 16-bit (big-endian)"); | |
57 case AFMT_S16_LE: | |
58 return("signed 16-bit (little-endian)"); | |
59 case AFMT_S16_BE: | |
60 return("unsigned 16-bit (big-endian)"); | |
61 } | |
62 return("unknown"); | |
63 } |