summaryrefslogtreecommitdiff
path: root/lib/rbcodec/metadata/aac.c
diff options
context:
space:
mode:
authorroman.artiukhin <bahusdrive@gmail.com>2023-12-22 13:40:54 +0200
committerSolomon Peachy <pizza@shaftnet.org>2023-12-31 20:44:15 -0500
commit4cd65b9d97e5fb172477b31d3dc5bc136cc6950b (patch)
tree1ea09715a6f15456d762efa22dc40617e20e393d /lib/rbcodec/metadata/aac.c
parentfc65bdab4e9d62fb5edf74284944a204aefd5160 (diff)
downloadrockbox-4cd65b9d97e5fb172477b31d3dc5bc136cc6950b.tar.gz
rockbox-4cd65b9d97e5fb172477b31d3dc5bc136cc6950b.zip
Codecs: mp4: Disable SBR decoding for PP5002 - PP5022 platforms
Includes ipod video (5G) and earlier models, sansa c200 and others players not capable to decode AAC-HE. Allows to play backward compatible files as AAC-LC. Change-Id: Ic9f5c0f255d9a4308c3414d402f8f27f4328ca94
Diffstat (limited to 'lib/rbcodec/metadata/aac.c')
-rw-r--r--lib/rbcodec/metadata/aac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rbcodec/metadata/aac.c b/lib/rbcodec/metadata/aac.c
index 358b2de079..372bab716e 100644
--- a/lib/rbcodec/metadata/aac.c
+++ b/lib/rbcodec/metadata/aac.c
@@ -93,11 +93,13 @@ bool get_aac_metadata(int fd, struct mp3entry *entry)
93 break; 93 break;
94 } 94 }
95 entry->bitrate = (unsigned int)((total * entry->frequency / frames + 64000) / 128000); 95 entry->bitrate = (unsigned int)((total * entry->frequency / frames + 64000) / 128000);
96#ifdef CODEC_AAC_SBR_DEC
96 if (entry->frequency <= 24000) 97 if (entry->frequency <= 24000)
97 { 98 {
98 entry->frequency <<= 1; 99 entry->frequency <<= 1;
99 entry->needs_upsampling_correction = true; 100 entry->needs_upsampling_correction = true;
100 } 101 }
102#endif
101 } 103 }
102 else 104 else
103 { 105 {