summaryrefslogtreecommitdiffstats
path: root/apps/codec_thread.c
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-02-03 08:28:23 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-02-03 08:28:23 +0000
commit7345ac124e3b56a402b6a004d968d40b4ffeaa50 (patch)
treeb5ebad1095949bdc1c4edb18e45c9b5a2d946c06 /apps/codec_thread.c
parent1bb3d61ef372e00986dd03672de944f756aeab4a (diff)
downloadrockbox-7345ac124e3b56a402b6a004d968d40b4ffeaa50.tar.gz
rockbox-7345ac124e3b56a402b6a004d968d40b4ffeaa50.zip
Submit FS#11918: Add 2 more codec types to be able to differentiate between AAC / AAC-HE and MPC SV7 / SV8. Additionally handle ATARI soundfiles in get_codec_base_type() as intended.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29199 a1c6a512-1295-4272-9138-f99709370657
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);
/** misc external functions */
+/* Used to check whether a new codec must be loaded. See array audio_formats[]
+ * in metadata.c */
int get_codec_base_type(int type)
{
+ int base_type = type;
switch (type) {
case AFMT_MPA_L1:
case AFMT_MPA_L2:
case AFMT_MPA_L3:
- return AFMT_MPA_L3;
+ base_type = AFMT_MPA_L3;
+ break;
+ case AFMT_MPC_SV7:
+ case AFMT_MPC_SV8:
+ base_type = AFMT_MPC_SV7;
+ break;
+ case AFMT_MP4_AAC:
+ case AFMT_MP4_AAC_HE:
+ base_type = AFMT_MP4_AAC;
+ break;
+ case AFMT_SAP:
+ case AFMT_CMC:
+ case AFMT_CM3:
+ case AFMT_CMR:
+ case AFMT_CMS:
+ case AFMT_DMC:
+ case AFMT_DLT:
+ case AFMT_MPT:
+ case AFMT_MPD:
+ case AFMT_RMT:
+ case AFMT_TMC:
+ case AFMT_TM8:
+ case AFMT_TM2:
+ base_type = AFMT_SAP;
+ break;
+ default:
+ break;
}
- return type;
+ return base_type;
}
const char *get_codec_filename(int cod_spec)