summaryrefslogtreecommitdiff
path: root/apps/codec_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codec_thread.c')
-rw-r--r--apps/codec_thread.c33
1 files changed, 31 insertions, 2 deletions
diff --git a/apps/codec_thread.c b/apps/codec_thread.c
index 21d55a7779..ef02f70811 100644
--- a/apps/codec_thread.c
+++ b/apps/codec_thread.c
@@ -102,16 +102,45 @@ static bool codec_load_next_track(void);
102 102
103/** misc external functions */ 103/** misc external functions */
104 104
105/* Used to check whether a new codec must be loaded. See array audio_formats[]
106 * in metadata.c */
105int get_codec_base_type(int type) 107int get_codec_base_type(int type)
106{ 108{
109 int base_type = type;
107 switch (type) { 110 switch (type) {
108 case AFMT_MPA_L1: 111 case AFMT_MPA_L1:
109 case AFMT_MPA_L2: 112 case AFMT_MPA_L2:
110 case AFMT_MPA_L3: 113 case AFMT_MPA_L3:
111 return AFMT_MPA_L3; 114 base_type = AFMT_MPA_L3;
115 break;
116 case AFMT_MPC_SV7:
117 case AFMT_MPC_SV8:
118 base_type = AFMT_MPC_SV7;
119 break;
120 case AFMT_MP4_AAC:
121 case AFMT_MP4_AAC_HE:
122 base_type = AFMT_MP4_AAC;
123 break;
124 case AFMT_SAP:
125 case AFMT_CMC:
126 case AFMT_CM3:
127 case AFMT_CMR:
128 case AFMT_CMS:
129 case AFMT_DMC:
130 case AFMT_DLT:
131 case AFMT_MPT:
132 case AFMT_MPD:
133 case AFMT_RMT:
134 case AFMT_TMC:
135 case AFMT_TM8:
136 case AFMT_TM2:
137 base_type = AFMT_SAP;
138 break;
139 default:
140 break;
112 } 141 }
113 142
114 return type; 143 return base_type;
115} 144}
116 145
117const char *get_codec_filename(int cod_spec) 146const char *get_codec_filename(int cod_spec)