Mercurial > mplayer.hg
annotate libao2/afmt.c @ 13963:a22ffcf85c53
fixed missing para tag
author | gabrov |
---|---|
date | Wed, 17 Nov 2004 16:17:47 +0000 |
parents | d8808729d3fd |
children | a92101a7eb49 |
rev | line source |
---|---|
2812 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
3 | |
4 #include "../config.h" | |
5 #include "afmt.h" | |
6 | |
7 char *audio_out_format_name(int format) | |
8 { | |
9 switch (format) | |
10 { | |
11 case AFMT_MU_LAW: | |
12 return("Mu-Law"); | |
13 case AFMT_A_LAW: | |
14 return("A-Law"); | |
15 case AFMT_IMA_ADPCM: | |
16 return("Ima-ADPCM"); | |
17 case AFMT_S8: | |
18 return("Signed 8-bit"); | |
19 case AFMT_U8: | |
20 return("Unsigned 8-bit"); | |
21 case AFMT_U16_LE: | |
22 return("Unsigned 16-bit (Little-Endian)"); | |
23 case AFMT_U16_BE: | |
24 return("Unsigned 16-bit (Big-Endian)"); | |
25 case AFMT_S16_LE: | |
26 return("Signed 16-bit (Little-Endian)"); | |
27 case AFMT_S16_BE: | |
28 return("Signed 16-bit (Big-Endian)"); | |
29 case AFMT_MPEG: | |
30 return("MPEG (2) audio"); | |
31 case AFMT_AC3: | |
32 return("AC3"); | |
13565 | 33 case AFMT_U32_LE: |
34 return("Unsigned 32-bit (Little-Endian)"); | |
35 case AFMT_U32_BE: | |
36 return("Unsigned 32-bit (Big-Endian)"); | |
2812 | 37 case AFMT_S32_LE: |
38 return("Signed 32-bit (Little-Endian)"); | |
39 case AFMT_S32_BE: | |
40 return("Signed 32-bit (Big-Endian)"); | |
13565 | 41 case AFMT_U24_LE: |
42 return("Unsigned 24-bit (Little-Endian)"); | |
43 case AFMT_U24_BE: | |
44 return("Unsigned 24-bit (Big-Endian)"); | |
13548
661718721c92
introducing 24bit formats and make the values compliant to OSS
alex
parents:
12476
diff
changeset
|
45 case AFMT_S24_LE: |
661718721c92
introducing 24bit formats and make the values compliant to OSS
alex
parents:
12476
diff
changeset
|
46 return("Signed 24-bit (Little-Endian)"); |
661718721c92
introducing 24bit formats and make the values compliant to OSS
alex
parents:
12476
diff
changeset
|
47 case AFMT_S24_BE: |
661718721c92
introducing 24bit formats and make the values compliant to OSS
alex
parents:
12476
diff
changeset
|
48 return("Signed 24-bit (Big-Endian)"); |
8222 | 49 case AFMT_FLOAT: |
50 return("Floating Point"); | |
2812 | 51 } |
52 return("Unknown"); | |
53 } | |
6026 | 54 |
55 // return number of bits for 1 sample in one channel, or 8 bits for compressed | |
56 int audio_out_format_bits(int format){ | |
57 switch (format) | |
58 { | |
8222 | 59 case AFMT_S16_LE: |
60 case AFMT_S16_BE: | |
61 case AFMT_U16_LE: | |
62 case AFMT_U16_BE: | |
63 return 16;//16 bits | |
64 | |
6026 | 65 case AFMT_S32_LE: |
66 case AFMT_S32_BE: | |
13565 | 67 case AFMT_U32_LE: |
68 case AFMT_U32_BE: | |
8222 | 69 case AFMT_FLOAT: |
70 return 32; | |
13548
661718721c92
introducing 24bit formats and make the values compliant to OSS
alex
parents:
12476
diff
changeset
|
71 |
661718721c92
introducing 24bit formats and make the values compliant to OSS
alex
parents:
12476
diff
changeset
|
72 case AFMT_S24_LE: |
661718721c92
introducing 24bit formats and make the values compliant to OSS
alex
parents:
12476
diff
changeset
|
73 case AFMT_S24_BE: |
13565 | 74 case AFMT_U24_LE: |
75 case AFMT_U24_BE: | |
13548
661718721c92
introducing 24bit formats and make the values compliant to OSS
alex
parents:
12476
diff
changeset
|
76 return 24; |
6026 | 77 |
78 case AFMT_MU_LAW: | |
79 case AFMT_A_LAW: | |
80 case AFMT_IMA_ADPCM: | |
81 case AFMT_S8: | |
82 case AFMT_U8: | |
83 case AFMT_MPEG: | |
84 case AFMT_AC3: | |
85 default: | |
86 return 8;//default 1 byte | |
87 | |
88 } | |
89 return 8; | |
6335
e9bd97d5c5cc
warning & newline fixes by Dominik Mierzejewski <dominik@rangers.eu.org>
arpi
parents:
6026
diff
changeset
|
90 } |