Mercurial > mplayer.hg
annotate libao2/audio_out.c @ 1183:6fbcfe7f7f10
vo/ao_subdevice implemented
author | al3x |
---|---|
date | Thu, 21 Jun 2001 22:34:02 +0000 |
parents | 2cd5ab1bee75 |
children | e21c96e28062 |
rev | line source |
---|---|
954 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
3 | |
4 #include "../config.h" | |
5 #include "audio_out.h" | |
1058 | 6 #include "afmt.h" |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
7 |
954 | 8 // there are some globals: |
9 int ao_samplerate=0; | |
10 int ao_channels=0; | |
11 int ao_format=0; | |
12 int ao_bps=0; | |
13 int ao_outburst=OUTBURST; // config.h default | |
14 int ao_buffersize=-1; | |
15 | |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
16 #ifdef USE_OSS_AUDIO |
954 | 17 extern ao_functions_t audio_out_oss; |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
18 #endif |
954 | 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 | |
1032 | 24 #ifdef HAVE_ALSA9 |
25 extern ao_functions_t audio_out_alsa9; | |
26 #endif | |
27 #ifdef HAVE_ESD | |
28 extern ao_functions_t audio_out_esd; | |
29 #endif | |
966
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
30 #ifdef HAVE_SDL |
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
31 extern ao_functions_t audio_out_sdl; |
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
32 #endif |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
33 #ifdef USE_SUN_AUDIO |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
34 extern ao_functions_t audio_out_sun; |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
35 #endif |
1107 | 36 extern ao_functions_t audio_out_pcm; |
954 | 37 |
38 ao_functions_t* audio_out_drivers[] = | |
39 { | |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
40 #ifdef USE_OSS_AUDIO |
954 | 41 &audio_out_oss, |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
42 #endif |
954 | 43 &audio_out_null, |
1007 | 44 #ifdef HAVE_ALSA5 |
995 | 45 &audio_out_alsa5, |
1007 | 46 #endif |
1032 | 47 #ifdef HAVE_ALSA9 |
48 &audio_out_alsa9, | |
49 #endif | |
50 #ifdef HAVE_ESD | |
51 &audio_out_esd, | |
52 #endif | |
966
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
53 #ifdef HAVE_SDL |
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
54 &audio_out_sdl, |
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
55 #endif |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
56 #ifdef USE_SUN_AUDIO |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
57 &audio_out_sun, |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
58 #endif |
1107 | 59 &audio_out_pcm, |
954 | 60 NULL |
61 }; | |
62 | |
995 | 63 char *audio_out_format_name(int format) |
64 { | |
65 switch (format) | |
66 { | |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
67 case AFMT_MU_LAW: |
1121 | 68 return("Mu-Law"); |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
69 case AFMT_A_LAW: |
1121 | 70 return("A-Law"); |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
71 case AFMT_IMA_ADPCM: |
1121 | 72 return("Ima-ADPCM"); |
995 | 73 case AFMT_S8: |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
74 return("Signed 8-bit"); |
995 | 75 case AFMT_U8: |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
76 return("Unsigned 8-bit"); |
995 | 77 case AFMT_U16_LE: |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
78 return("Unsigned 16-bit (Little-Endian)"); |
995 | 79 case AFMT_U16_BE: |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
80 return("Unsigned 16-bit (Big-Endian)"); |
995 | 81 case AFMT_S16_LE: |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
82 return("Signed 16-bit (Little-Endian)"); |
995 | 83 case AFMT_S16_BE: |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
84 return("Unsigned 16-bit (Big-Endian)"); |
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
85 case AFMT_MPEG: |
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
86 return("MPEG (2) audio"); |
1121 | 87 /* |
88 the following two formats are not available with old linux kernel | |
89 headers (e.g. in 2.2.16) | |
90 */ | |
1058 | 91 #ifdef AFMT_S32_LE |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
92 case AFMT_S32_LE: |
1058 | 93 return("Signed 32-bit (Little-Endian)"); |
94 #endif | |
95 #ifdef AFMT_S32_BE | |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
96 case AFMT_S32_BE: |
1058 | 97 return("Signed 32-bit (Big-Endian)"); |
98 #endif | |
995 | 99 } |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
100 return("Unknown"); |
995 | 101 } |