From 7345ac124e3b56a402b6a004d968d40b4ffeaa50 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Thu, 3 Feb 2011 08:28:23 +0000 Subject: 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 --- apps/codec_thread.c | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'apps/codec_thread.c') 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) -- cgit v1.2.3