From 8cb555460ff79e636a7907fb2589e16db98c8600 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Fri, 17 Jul 2020 00:01:32 -0400 Subject: [3/4] Completely remove HWCODEC support 'swcodec' is now always set (and recording_swcodec for recording-capable units) in feature.txt so the manual and language strings don't need to all be fixed up. Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0 --- lib/rbcodec/metadata/mp3data.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'lib/rbcodec/metadata/mp3data.c') diff --git a/lib/rbcodec/metadata/mp3data.c b/lib/rbcodec/metadata/mp3data.c index 49f9786c29..83605126d6 100644 --- a/lib/rbcodec/metadata/mp3data.c +++ b/lib/rbcodec/metadata/mp3data.c @@ -115,11 +115,6 @@ static bool is_mp3frameheader(unsigned long head) return false; if (!(head & LAYER_MASK)) /* no layer? */ return false; -#if CONFIG_CODEC != SWCODEC - /* The MAS can't decode layer 1, so treat layer 1 data as invalid */ - if ((head & LAYER_MASK) == LAYER_MASK) - return false; -#endif if ((head & BITRATE_MASK) == BITRATE_MASK) /* bad bitrate? */ return false; if (!(head & BITRATE_MASK)) /* no bitrate? */ @@ -454,7 +449,6 @@ static void get_xing_info(struct mp3info *info, unsigned char *buf) /* We don't care about this, but need to skip it */ i += 4; } -#if CONFIG_CODEC==SWCODEC i += 21; info->enc_delay = ((int)buf[i ] << 4) | (buf[i+1] >> 4); info->enc_padding = ((int)(buf[i+1]&0xF) << 8) | buf[i+2]; @@ -467,7 +461,6 @@ static void get_xing_info(struct mp3info *info, unsigned char *buf) info->enc_delay = -1; info->enc_padding = -1; } -#endif } /* Extract information from a 'VBRI' header. */ @@ -541,18 +534,16 @@ int get_mp3file_info(int fd, struct mp3info *info) /* Initialize info and frame */ memset(info, 0, sizeof(struct mp3info)); memset(frame, 0, sizeof(frame)); - -#if CONFIG_CODEC==SWCODEC + /* These two are needed for proper LAME gapless MP3 playback */ info->enc_delay = -1; info->enc_padding = -1; -#endif /* Get the very first single MPEG frame. */ result = get_next_header_info(fd, &bytecount, info, true); if(result) return result; - + /* Read the amount of frame data to the buffer that is required for the * vbr tag parsing. Skip the rest. */ buf_size = MIN(info->frame_size-4, (int)sizeof(frame)); -- cgit v1.2.3