summaryrefslogtreecommitdiff
path: root/apps/enc_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/enc_config.c')
-rw-r--r--apps/enc_config.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/apps/enc_config.c b/apps/enc_config.c
index 3323c8dd94..c916b295df 100644
--- a/apps/enc_config.c
+++ b/apps/enc_config.c
@@ -134,7 +134,7 @@ static bool mp3_enc_bitrate(struct menucallback_data *data)
134 /* mono only */ 134 /* mono only */
135 { "16 kBit/s", TALK_ID(16, UNIT_KBIT) }, /* 2 */ 135 { "16 kBit/s", TALK_ID(16, UNIT_KBIT) }, /* 2 */
136 { "24 kBit/s", TALK_ID(24, UNIT_KBIT) }, /* 2 */ 136 { "24 kBit/s", TALK_ID(24, UNIT_KBIT) }, /* 2 */
137#endif 137#endif /* HAVE_MPEG2_SAMPR */
138 /* stereo/mono */ 138 /* stereo/mono */
139 { "32 kBit/s", TALK_ID(32, UNIT_KBIT) }, /* 1,2 */ 139 { "32 kBit/s", TALK_ID(32, UNIT_KBIT) }, /* 1,2 */
140 { "40 kBit/s", TALK_ID(40, UNIT_KBIT) }, /* 1,2 */ 140 { "40 kBit/s", TALK_ID(40, UNIT_KBIT) }, /* 1,2 */
@@ -145,16 +145,19 @@ static bool mp3_enc_bitrate(struct menucallback_data *data)
145 { "96 kBit/s", TALK_ID(96, UNIT_KBIT) }, /* 1,2 */ 145 { "96 kBit/s", TALK_ID(96, UNIT_KBIT) }, /* 1,2 */
146 { "112 kBit/s", TALK_ID(112, UNIT_KBIT) }, /* 1,2 */ 146 { "112 kBit/s", TALK_ID(112, UNIT_KBIT) }, /* 1,2 */
147 { "128 kBit/s", TALK_ID(128, UNIT_KBIT) }, /* 1,2 */ 147 { "128 kBit/s", TALK_ID(128, UNIT_KBIT) }, /* 1,2 */
148#if 0 148 /* Leave out 144 when there is both MPEG 1 and 2 */
149#if defined(HAVE_MPEG2_SAMPR) && !defined (HAVE_MPEG1_SAMPR)
149 /* oddball MPEG2-only rate stuck in the middle */ 150 /* oddball MPEG2-only rate stuck in the middle */
150 { "144 kBit/s", TALK_ID(144, UNIT_KBIT) }, /* 2 */ 151 { "144 kBit/s", TALK_ID(144, UNIT_KBIT) }, /* 2 */
151#endif 152#endif
152 { "160 kBit/s", TALK_ID(160, UNIT_KBIT) }, /* 1,2 */ 153 { "160 kBit/s", TALK_ID(160, UNIT_KBIT) }, /* 1,2 */
154#ifdef HAVE_MPEG1_SAMPR
153 /* stereo only */ 155 /* stereo only */
154 { "192 kBit/s", TALK_ID(192, UNIT_KBIT) }, /* 1 */ 156 { "192 kBit/s", TALK_ID(192, UNIT_KBIT) }, /* 1 */
155 { "224 kBit/s", TALK_ID(224, UNIT_KBIT) }, /* 1 */ 157 { "224 kBit/s", TALK_ID(224, UNIT_KBIT) }, /* 1 */
156 { "256 kBit/s", TALK_ID(256, UNIT_KBIT) }, /* 1 */ 158 { "256 kBit/s", TALK_ID(256, UNIT_KBIT) }, /* 1 */
157 { "320 kBit/s", TALK_ID(320, UNIT_KBIT) }, /* 1 */ 159 { "320 kBit/s", TALK_ID(320, UNIT_KBIT) }, /* 1 */
160#endif
158 }; 161 };
159 162
160 unsigned long rate_list[ARRAYLEN(items)]; 163 unsigned long rate_list[ARRAYLEN(items)];
@@ -163,10 +166,17 @@ static bool mp3_enc_bitrate(struct menucallback_data *data)
163 storing and maintaining yet another list of numbers */ 166 storing and maintaining yet another list of numbers */
164 int n_rates = make_list_from_caps32( 167 int n_rates = make_list_from_caps32(
165 MPEG1_BITR_CAPS | MPEG2_BITR_CAPS, mp3_enc_bitr, 168 MPEG1_BITR_CAPS | MPEG2_BITR_CAPS, mp3_enc_bitr,
166 MPEG1_BITR_CAPS 169 0
170#ifdef HAVE_MPEG1_SAMPR
171 | MPEG1_BITR_CAPS
172#endif
167#ifdef HAVE_MPEG2_SAMPR 173#ifdef HAVE_MPEG2_SAMPR
174#ifdef HAVE_MPEG1_SAMPR
168 | (MPEG2_BITR_CAPS & ~(MP3_BITR_CAP_144 | MP3_BITR_CAP_8)) 175 | (MPEG2_BITR_CAPS & ~(MP3_BITR_CAP_144 | MP3_BITR_CAP_8))
176#else
177 | (MPEG2_BITR_CAPS & ~(MP3_BITR_CAP_8))
169#endif 178#endif
179#endif /* HAVE_MPEG2_SAMPR */
170 , rate_list); 180 , rate_list);
171 181
172 int index = round_value_to_list32(cfg->mp3_enc.bitrate, rate_list, 182 int index = round_value_to_list32(cfg->mp3_enc.bitrate, rate_list,