Mercurial > mplayer.hg
annotate libao2/audio_out.c @ 2708:b24661a9924e
ao_mpegpes
author | arpi |
---|---|
date | Mon, 05 Nov 2001 03:01:11 +0000 |
parents | 9d8d69fc517c |
children | 2c3ab498ac90 |
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; | |
2708 | 15 int ao_pts=0; |
1185 | 16 char *ao_subdevice = NULL; |
954 | 17 |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
18 #ifdef USE_OSS_AUDIO |
954 | 19 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
|
20 #endif |
954 | 21 //extern ao_functions_t audio_out_ossold; |
22 extern ao_functions_t audio_out_null; | |
1007 | 23 #ifdef HAVE_ALSA5 |
24 extern ao_functions_t audio_out_alsa5; | |
25 #endif | |
1032 | 26 #ifdef HAVE_ALSA9 |
27 extern ao_functions_t audio_out_alsa9; | |
28 #endif | |
29 #ifdef HAVE_ESD | |
30 extern ao_functions_t audio_out_esd; | |
31 #endif | |
966
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
32 #ifdef HAVE_SDL |
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
33 extern ao_functions_t audio_out_sdl; |
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
34 #endif |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
35 #ifdef USE_SUN_AUDIO |
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
36 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
|
37 #endif |
2450 | 38 #ifdef USE_SGI_AUDIO |
39 extern ao_functions_t audio_out_sgi; | |
40 #endif | |
2645 | 41 #ifdef HAVE_DXR3 |
42 extern ao_functions_t audio_out_dxr3; | |
43 #endif | |
1107 | 44 extern ao_functions_t audio_out_pcm; |
2708 | 45 extern ao_functions_t audio_out_mpegpes; |
1185 | 46 extern ao_functions_t audio_out_pss; |
954 | 47 |
48 ao_functions_t* audio_out_drivers[] = | |
49 { | |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
50 #ifdef USE_OSS_AUDIO |
954 | 51 &audio_out_oss, |
1038
b36fb1ae4b53
applied solaris8/netbsd/other fixes patch by J¸«ärgen Keil <jk@tools.de>
arpi_esp
parents:
1032
diff
changeset
|
52 #endif |
1725
24e75b632740
Move the sun audio driver near the start of the list of audio drivers, so
jkeil
parents:
1528
diff
changeset
|
53 #ifdef USE_SUN_AUDIO |
24e75b632740
Move the sun audio driver near the start of the list of audio drivers, so
jkeil
parents:
1528
diff
changeset
|
54 &audio_out_sun, |
24e75b632740
Move the sun audio driver near the start of the list of audio drivers, so
jkeil
parents:
1528
diff
changeset
|
55 #endif |
2450 | 56 #ifdef USE_SGI_AUDIO |
57 &audio_out_sgi, | |
58 #endif | |
954 | 59 &audio_out_null, |
1007 | 60 #ifdef HAVE_ALSA5 |
995 | 61 &audio_out_alsa5, |
1007 | 62 #endif |
1032 | 63 #ifdef HAVE_ALSA9 |
64 &audio_out_alsa9, | |
65 #endif | |
66 #ifdef HAVE_ESD | |
67 &audio_out_esd, | |
68 #endif | |
966
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
69 #ifdef HAVE_SDL |
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
70 &audio_out_sdl, |
69b4f944ce08
Added support for sdl audio out (buggy pre-alpha).
atmosfear
parents:
954
diff
changeset
|
71 #endif |
2645 | 72 #ifdef HAVE_DXR3 |
73 &audio_out_dxr3, | |
74 #endif | |
1107 | 75 &audio_out_pcm, |
2708 | 76 &audio_out_mpegpes, |
1185 | 77 // &audio_out_pss, |
954 | 78 NULL |
79 }; | |
80 | |
995 | 81 char *audio_out_format_name(int format) |
82 { | |
83 switch (format) | |
84 { | |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
85 case AFMT_MU_LAW: |
1121 | 86 return("Mu-Law"); |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
87 case AFMT_A_LAW: |
1121 | 88 return("A-Law"); |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
89 case AFMT_IMA_ADPCM: |
1121 | 90 return("Ima-ADPCM"); |
995 | 91 case AFMT_S8: |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
92 return("Signed 8-bit"); |
995 | 93 case AFMT_U8: |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
94 return("Unsigned 8-bit"); |
995 | 95 case AFMT_U16_LE: |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
96 return("Unsigned 16-bit (Little-Endian)"); |
995 | 97 case AFMT_U16_BE: |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
98 return("Unsigned 16-bit (Big-Endian)"); |
995 | 99 case AFMT_S16_LE: |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
100 return("Signed 16-bit (Little-Endian)"); |
995 | 101 case AFMT_S16_BE: |
2450 | 102 return("Signed 16-bit (Big-Endian)"); |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
103 case AFMT_MPEG: |
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
104 return("MPEG (2) audio"); |
1528
a444bd456fcc
ac3/spdif patch by German Gomez Garcia <german@piraos.com>
arpi
parents:
1185
diff
changeset
|
105 case AFMT_AC3: |
a444bd456fcc
ac3/spdif patch by German Gomez Garcia <german@piraos.com>
arpi
parents:
1185
diff
changeset
|
106 return("AC3"); |
1121 | 107 /* |
108 the following two formats are not available with old linux kernel | |
109 headers (e.g. in 2.2.16) | |
110 */ | |
1058 | 111 #ifdef AFMT_S32_LE |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
112 case AFMT_S32_LE: |
1058 | 113 return("Signed 32-bit (Little-Endian)"); |
114 #endif | |
115 #ifdef AFMT_S32_BE | |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
116 case AFMT_S32_BE: |
1058 | 117 return("Signed 32-bit (Big-Endian)"); |
118 #endif | |
995 | 119 } |
1047
3239a22b956e
par kozmetikai valtoztatas, meg van ami nem :) cvs diff..
al3x
parents:
1038
diff
changeset
|
120 return("Unknown"); |
995 | 121 } |