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");
|
|
33 /*
|
|
34 the following two formats are not available with old linux kernel
|
|
35 headers (e.g. in 2.2.16)
|
|
36 */
|
|
37 #ifdef AFMT_S32_LE
|
|
38 case AFMT_S32_LE:
|
|
39 return("Signed 32-bit (Little-Endian)");
|
|
40 #endif
|
|
41 #ifdef AFMT_S32_BE
|
|
42 case AFMT_S32_BE:
|
|
43 return("Signed 32-bit (Big-Endian)");
|
|
44 #endif
|
|
45 }
|
|
46 return("Unknown");
|
|
47 }
|