diff options
-rw-r--r-- | apps/SOURCES | 2 | ||||
-rw-r--r-- | apps/bookmark.c | 10 | ||||
-rw-r--r-- | apps/dsp.c | 22 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 6 | ||||
-rw-r--r-- | apps/main.c | 4 | ||||
-rw-r--r-- | apps/menus/sound_menu.c | 5 | ||||
-rw-r--r-- | apps/plugin.c | 4 | ||||
-rw-r--r-- | apps/plugin.h | 4 | ||||
-rw-r--r-- | apps/plugins/mpegplayer/audio_thread.c | 2 | ||||
-rw-r--r-- | apps/settings.c | 2 | ||||
-rw-r--r-- | apps/settings.h | 2 | ||||
-rw-r--r-- | apps/settings_list.c | 2 |
12 files changed, 51 insertions, 14 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index 2a13b6245d..ad1003bb0d 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -157,7 +157,9 @@ codec_thread.c | |||
157 | playback.c | 157 | playback.c |
158 | codecs.c | 158 | codecs.c |
159 | dsp.c | 159 | dsp.c |
160 | #ifdef HAVE_PITCHSCREEN | ||
160 | tdspeed.c | 161 | tdspeed.c |
162 | #endif | ||
161 | #ifdef HAVE_RECORDING | 163 | #ifdef HAVE_RECORDING |
162 | enc_config.c | 164 | enc_config.c |
163 | recorder/pcm_record.c | 165 | recorder/pcm_record.c |
diff --git a/apps/bookmark.c b/apps/bookmark.c index dc6a09de10..efc43c6270 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c | |||
@@ -348,13 +348,13 @@ static char* create_bookmark() | |||
348 | snprintf(global_bookmark, sizeof(global_bookmark), | 348 | snprintf(global_bookmark, sizeof(global_bookmark), |
349 | /* new optional bookmark token descriptors should be inserted | 349 | /* new optional bookmark token descriptors should be inserted |
350 | just before the "%s;%s" in this line... */ | 350 | just before the "%s;%s" in this line... */ |
351 | #if CONFIG_CODEC == SWCODEC | 351 | #if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN) |
352 | ">%d;%d;%ld;%d;%ld;%d;%d;%ld;%ld;%s;%s", | 352 | ">%d;%d;%ld;%d;%ld;%d;%d;%ld;%ld;%s;%s", |
353 | #else | 353 | #else |
354 | ">%d;%d;%ld;%d;%ld;%d;%d;%s;%s", | 354 | ">%d;%d;%ld;%d;%ld;%d;%d;%s;%s", |
355 | #endif | 355 | #endif |
356 | /* ... their flags should go here ... */ | 356 | /* ... their flags should go here ... */ |
357 | #if CONFIG_CODEC == SWCODEC | 357 | #if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN) |
358 | BM_PITCH | BM_SPEED, | 358 | BM_PITCH | BM_SPEED, |
359 | #else | 359 | #else |
360 | 0, | 360 | 0, |
@@ -366,7 +366,7 @@ static char* create_bookmark() | |||
366 | global_settings.repeat_mode, | 366 | global_settings.repeat_mode, |
367 | global_settings.playlist_shuffle, | 367 | global_settings.playlist_shuffle, |
368 | /* ...and their values should go here */ | 368 | /* ...and their values should go here */ |
369 | #if CONFIG_CODEC == SWCODEC | 369 | #if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN) |
370 | (long)sound_get_pitch(), | 370 | (long)sound_get_pitch(), |
371 | (long)dsp_get_timestretch(), | 371 | (long)dsp_get_timestretch(), |
372 | #endif | 372 | #endif |
@@ -913,7 +913,7 @@ static void say_bookmark(const char* bookmark, | |||
913 | /* ------------------------------------------------------------------------*/ | 913 | /* ------------------------------------------------------------------------*/ |
914 | static bool play_bookmark(const char* bookmark) | 914 | static bool play_bookmark(const char* bookmark) |
915 | { | 915 | { |
916 | #if CONFIG_CODEC == SWCODEC | 916 | #if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN) |
917 | /* preset pitch and speed to 100% in case bookmark doesn't have info */ | 917 | /* preset pitch and speed to 100% in case bookmark doesn't have info */ |
918 | bm.pitch = sound_get_pitch(); | 918 | bm.pitch = sound_get_pitch(); |
919 | bm.speed = dsp_get_timestretch(); | 919 | bm.speed = dsp_get_timestretch(); |
@@ -923,7 +923,7 @@ static bool play_bookmark(const char* bookmark) | |||
923 | { | 923 | { |
924 | global_settings.repeat_mode = bm.repeat_mode; | 924 | global_settings.repeat_mode = bm.repeat_mode; |
925 | global_settings.playlist_shuffle = bm.shuffle; | 925 | global_settings.playlist_shuffle = bm.shuffle; |
926 | #if CONFIG_CODEC == SWCODEC | 926 | #if CONFIG_CODEC == SWCODEC && defined(HAVE_PITCHSCREEN) |
927 | sound_set_pitch(bm.pitch); | 927 | sound_set_pitch(bm.pitch); |
928 | dsp_set_timestretch(bm.speed); | 928 | dsp_set_timestretch(bm.speed); |
929 | #endif | 929 | #endif |
diff --git a/apps/dsp.c b/apps/dsp.c index 7292328212..33a54008e2 100644 --- a/apps/dsp.c +++ b/apps/dsp.c | |||
@@ -216,7 +216,9 @@ static int treble; /* A/V */ | |||
216 | #endif | 216 | #endif |
217 | 217 | ||
218 | /* Settings applicable to audio codec only */ | 218 | /* Settings applicable to audio codec only */ |
219 | #ifdef HAVE_PITCHSCREEN | ||
219 | static int32_t pitch_ratio = PITCH_SPEED_100; | 220 | static int32_t pitch_ratio = PITCH_SPEED_100; |
221 | #endif | ||
220 | static int channels_mode; | 222 | static int channels_mode; |
221 | long dsp_sw_gain; | 223 | long dsp_sw_gain; |
222 | long dsp_sw_cross; | 224 | long dsp_sw_cross; |
@@ -240,12 +242,14 @@ static bool crossfeed_enabled; | |||
240 | 242 | ||
241 | #define RESAMPLE_RATIO 4 /* Enough for 11,025 Hz -> 44,100 Hz */ | 243 | #define RESAMPLE_RATIO 4 /* Enough for 11,025 Hz -> 44,100 Hz */ |
242 | 244 | ||
245 | #ifdef HAVE_PITCHSCREEN | ||
243 | static int32_t small_sample_buf[SMALL_SAMPLE_BUF_COUNT] IBSS_ATTR; | 246 | static int32_t small_sample_buf[SMALL_SAMPLE_BUF_COUNT] IBSS_ATTR; |
244 | static int32_t small_resample_buf[SMALL_SAMPLE_BUF_COUNT * RESAMPLE_RATIO] IBSS_ATTR; | 247 | static int32_t small_resample_buf[SMALL_SAMPLE_BUF_COUNT * RESAMPLE_RATIO] IBSS_ATTR; |
245 | 248 | ||
246 | static int32_t *big_sample_buf = NULL; | 249 | static int32_t *big_sample_buf = NULL; |
247 | static int32_t *big_resample_buf = NULL; | 250 | static int32_t *big_resample_buf = NULL; |
248 | static int big_sample_buf_count = -1; /* -1=unknown, 0=not available */ | 251 | static int big_sample_buf_count = -1; /* -1=unknown, 0=not available */ |
252 | #endif | ||
249 | 253 | ||
250 | static int sample_buf_count; | 254 | static int sample_buf_count; |
251 | static int32_t *sample_buf; | 255 | static int32_t *sample_buf; |
@@ -274,6 +278,7 @@ static inline int32_t clip_sample_16(int32_t sample) | |||
274 | return sample; | 278 | return sample; |
275 | } | 279 | } |
276 | 280 | ||
281 | #ifdef HAVE_PITCHSCREEN | ||
277 | int32_t sound_get_pitch(void) | 282 | int32_t sound_get_pitch(void) |
278 | { | 283 | { |
279 | return pitch_ratio; | 284 | return pitch_ratio; |
@@ -347,6 +352,7 @@ bool dsp_timestretch_available() | |||
347 | { | 352 | { |
348 | return (global_settings.timestretch_enabled && big_sample_buf_count > 0); | 353 | return (global_settings.timestretch_enabled && big_sample_buf_count > 0); |
349 | } | 354 | } |
355 | #endif | ||
350 | 356 | ||
351 | /* Convert count samples to the internal format, if needed. Updates src | 357 | /* Convert count samples to the internal format, if needed. Updates src |
352 | * to point past the samples "consumed" and dst is set to point to the | 358 | * to point past the samples "consumed" and dst is set to point to the |
@@ -1225,8 +1231,10 @@ int dsp_process(struct dsp_config *dsp, char *dst, const char *src[], int count) | |||
1225 | 1231 | ||
1226 | dsp->input_samples(samples, src, tmp); | 1232 | dsp->input_samples(samples, src, tmp); |
1227 | 1233 | ||
1234 | #ifdef HAVE_PITCHSCREEN | ||
1228 | if (dsp->tdspeed_active) | 1235 | if (dsp->tdspeed_active) |
1229 | samples = tdspeed_doit(tmp, samples); | 1236 | samples = tdspeed_doit(tmp, samples); |
1237 | #endif | ||
1230 | 1238 | ||
1231 | int chunk_offset = 0; | 1239 | int chunk_offset = 0; |
1232 | while (samples > 0) | 1240 | while (samples > 0) |
@@ -1294,8 +1302,10 @@ int dsp_process(struct dsp_config *dsp, char *dst, const char *src[], int count) | |||
1294 | /* dsp_input_size MUST be called afterwards */ | 1302 | /* dsp_input_size MUST be called afterwards */ |
1295 | int dsp_output_count(struct dsp_config *dsp, int count) | 1303 | int dsp_output_count(struct dsp_config *dsp, int count) |
1296 | { | 1304 | { |
1305 | #ifdef HAVE_PITCHSCREEN | ||
1297 | if (dsp->tdspeed_active) | 1306 | if (dsp->tdspeed_active) |
1298 | count = tdspeed_est_output_size(); | 1307 | count = tdspeed_est_output_size(); |
1308 | #endif | ||
1299 | if (dsp->resample) | 1309 | if (dsp->resample) |
1300 | { | 1310 | { |
1301 | count = (int)(((unsigned long)count * NATIVE_FREQUENCY | 1311 | count = (int)(((unsigned long)count * NATIVE_FREQUENCY |
@@ -1329,8 +1339,10 @@ int dsp_input_count(struct dsp_config *dsp, int count) | |||
1329 | dsp->data.resample_data.delta) >> 16); | 1339 | dsp->data.resample_data.delta) >> 16); |
1330 | } | 1340 | } |
1331 | 1341 | ||
1342 | #ifdef HAVE_PITCHSCREEN | ||
1332 | if (dsp->tdspeed_active) | 1343 | if (dsp->tdspeed_active) |
1333 | count = tdspeed_est_input_size(count); | 1344 | count = tdspeed_est_input_size(count); |
1345 | #endif | ||
1334 | 1346 | ||
1335 | return count; | 1347 | return count; |
1336 | } | 1348 | } |
@@ -1373,13 +1385,17 @@ intptr_t dsp_configure(struct dsp_config *dsp, int setting, intptr_t value) | |||
1373 | if we're called from the main audio thread. Voice UI thread should | 1385 | if we're called from the main audio thread. Voice UI thread should |
1374 | not need this feature. | 1386 | not need this feature. |
1375 | */ | 1387 | */ |
1388 | #ifdef HAVE_PITCHSCREEN | ||
1376 | if (dsp == &AUDIO_DSP) | 1389 | if (dsp == &AUDIO_DSP) |
1377 | dsp->frequency = pitch_ratio * dsp->codec_frequency / PITCH_SPEED_100; | 1390 | dsp->frequency = pitch_ratio * dsp->codec_frequency / PITCH_SPEED_100; |
1378 | else | 1391 | else |
1392 | #endif | ||
1379 | dsp->frequency = dsp->codec_frequency; | 1393 | dsp->frequency = dsp->codec_frequency; |
1380 | 1394 | ||
1381 | resampler_new_delta(dsp); | 1395 | resampler_new_delta(dsp); |
1396 | #ifdef HAVE_PITCHSCREEN | ||
1382 | tdspeed_setup(dsp); | 1397 | tdspeed_setup(dsp); |
1398 | #endif | ||
1383 | break; | 1399 | break; |
1384 | 1400 | ||
1385 | case DSP_SET_SAMPLE_DEPTH: | 1401 | case DSP_SET_SAMPLE_DEPTH: |
@@ -1409,7 +1425,9 @@ intptr_t dsp_configure(struct dsp_config *dsp, int setting, intptr_t value) | |||
1409 | dsp->stereo_mode = value; | 1425 | dsp->stereo_mode = value; |
1410 | dsp->data.num_channels = value == STEREO_MONO ? 1 : 2; | 1426 | dsp->data.num_channels = value == STEREO_MONO ? 1 : 2; |
1411 | dsp_update_functions(dsp); | 1427 | dsp_update_functions(dsp); |
1428 | #ifdef HAVE_PITCHSCREEN | ||
1412 | tdspeed_setup(dsp); | 1429 | tdspeed_setup(dsp); |
1430 | #endif | ||
1413 | break; | 1431 | break; |
1414 | 1432 | ||
1415 | case DSP_RESET: | 1433 | case DSP_RESET: |
@@ -1434,7 +1452,9 @@ intptr_t dsp_configure(struct dsp_config *dsp, int setting, intptr_t value) | |||
1434 | 1452 | ||
1435 | dsp_update_functions(dsp); | 1453 | dsp_update_functions(dsp); |
1436 | resampler_new_delta(dsp); | 1454 | resampler_new_delta(dsp); |
1455 | #ifdef HAVE_PITCHSCREEN | ||
1437 | tdspeed_setup(dsp); | 1456 | tdspeed_setup(dsp); |
1457 | #endif | ||
1438 | if (dsp == &AUDIO_DSP) | 1458 | if (dsp == &AUDIO_DSP) |
1439 | release_gain = UNITY; | 1459 | release_gain = UNITY; |
1440 | break; | 1460 | break; |
@@ -1444,7 +1464,9 @@ intptr_t dsp_configure(struct dsp_config *dsp, int setting, intptr_t value) | |||
1444 | sizeof (dsp->data.resample_data)); | 1464 | sizeof (dsp->data.resample_data)); |
1445 | resampler_new_delta(dsp); | 1465 | resampler_new_delta(dsp); |
1446 | dither_init(dsp); | 1466 | dither_init(dsp); |
1467 | #ifdef HAVE_PITCHSCREEN | ||
1447 | tdspeed_setup(dsp); | 1468 | tdspeed_setup(dsp); |
1469 | #endif | ||
1448 | if (dsp == &AUDIO_DSP) | 1470 | if (dsp == &AUDIO_DSP) |
1449 | release_gain = UNITY; | 1471 | release_gain = UNITY; |
1450 | break; | 1472 | break; |
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index bf024c7e2e..1bfc861624 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c | |||
@@ -120,7 +120,7 @@ char* get_dir(char* buf, int buf_size, const char* path, int level) | |||
120 | return buf; | 120 | return buf; |
121 | } | 121 | } |
122 | 122 | ||
123 | #if (CONFIG_CODEC != MAS3507D) | 123 | #if (CONFIG_CODEC != MAS3507D) && defined (HAVE_PITCHSCREEN) |
124 | /* A helper to determine the enum value for pitch/speed. | 124 | /* A helper to determine the enum value for pitch/speed. |
125 | 125 | ||
126 | When there are two choices (i.e. boolean), return 1 if the value is | 126 | When there are two choices (i.e. boolean), return 1 if the value is |
@@ -1141,7 +1141,7 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1141 | } | 1141 | } |
1142 | #endif /* (CONFIG_CODEC == SWCODEC) */ | 1142 | #endif /* (CONFIG_CODEC == SWCODEC) */ |
1143 | 1143 | ||
1144 | #if (CONFIG_CODEC != MAS3507D) | 1144 | #if (CONFIG_CODEC != MAS3507D) && defined (HAVE_PITCHSCREEN) |
1145 | case SKIN_TOKEN_SOUND_PITCH: | 1145 | case SKIN_TOKEN_SOUND_PITCH: |
1146 | { | 1146 | { |
1147 | int32_t pitch = sound_get_pitch(); | 1147 | int32_t pitch = sound_get_pitch(); |
@@ -1156,7 +1156,7 @@ const char *get_token_value(struct gui_wps *gwps, | |||
1156 | } | 1156 | } |
1157 | #endif | 1157 | #endif |
1158 | 1158 | ||
1159 | #if CONFIG_CODEC == SWCODEC | 1159 | #if (CONFIG_CODEC == SWCODEC) && defined (HAVE_PITCHSCREEN) |
1160 | case SKIN_TOKEN_SOUND_SPEED: | 1160 | case SKIN_TOKEN_SOUND_SPEED: |
1161 | { | 1161 | { |
1162 | int32_t pitch = sound_get_pitch(); | 1162 | int32_t pitch = sound_get_pitch(); |
diff --git a/apps/main.c b/apps/main.c index b86b083e44..949790b05f 100644 --- a/apps/main.c +++ b/apps/main.c | |||
@@ -399,7 +399,7 @@ static void init(void) | |||
399 | #endif /* CONFIG_CODEC != SWCODEC */ | 399 | #endif /* CONFIG_CODEC != SWCODEC */ |
400 | 400 | ||
401 | scrobbler_init(); | 401 | scrobbler_init(); |
402 | #if CONFIG_CODEC == SWCODEC | 402 | #if CONFIG_CODEC == SWCODEC && defined (HAVE_PITCHSCREEN) |
403 | tdspeed_init(); | 403 | tdspeed_init(); |
404 | #endif /* CONFIG_CODEC == SWCODEC */ | 404 | #endif /* CONFIG_CODEC == SWCODEC */ |
405 | 405 | ||
@@ -663,7 +663,7 @@ static void init(void) | |||
663 | tree_mem_init(); | 663 | tree_mem_init(); |
664 | filetype_init(); | 664 | filetype_init(); |
665 | scrobbler_init(); | 665 | scrobbler_init(); |
666 | #if CONFIG_CODEC == SWCODEC | 666 | #if CONFIG_CODEC == SWCODEC && defined (HAVE_PITCHSCREEN) |
667 | tdspeed_init(); | 667 | tdspeed_init(); |
668 | #endif /* CONFIG_CODEC == SWCODEC */ | 668 | #endif /* CONFIG_CODEC == SWCODEC */ |
669 | theme_init_buffer(); | 669 | theme_init_buffer(); |
diff --git a/apps/menus/sound_menu.c b/apps/menus/sound_menu.c index e9715534c9..9fc10f88b8 100644 --- a/apps/menus/sound_menu.c +++ b/apps/menus/sound_menu.c | |||
@@ -104,6 +104,7 @@ MENUITEM_SETTING(depth_3d, &global_settings.depth_3d, NULL); | |||
104 | &crossfeed, &crossfeed_direct_gain, &crossfeed_cross_gain, | 104 | &crossfeed, &crossfeed_direct_gain, &crossfeed_cross_gain, |
105 | &crossfeed_hf_attenuation, &crossfeed_hf_cutoff); | 105 | &crossfeed_hf_attenuation, &crossfeed_hf_cutoff); |
106 | 106 | ||
107 | #ifdef HAVE_PIUTCHSCREEN | ||
107 | static int timestretch_callback(int action,const struct menu_item_ex *this_item) | 108 | static int timestretch_callback(int action,const struct menu_item_ex *this_item) |
108 | { | 109 | { |
109 | switch (action) | 110 | switch (action) |
@@ -118,6 +119,8 @@ static int timestretch_callback(int action,const struct menu_item_ex *this_item) | |||
118 | } | 119 | } |
119 | MENUITEM_SETTING(timestretch_enabled, | 120 | MENUITEM_SETTING(timestretch_enabled, |
120 | &global_settings.timestretch_enabled, timestretch_callback); | 121 | &global_settings.timestretch_enabled, timestretch_callback); |
122 | #endif | ||
123 | |||
121 | MENUITEM_SETTING(dithering_enabled, | 124 | MENUITEM_SETTING(dithering_enabled, |
122 | &global_settings.dithering_enabled, lowlatency_callback); | 125 | &global_settings.dithering_enabled, lowlatency_callback); |
123 | 126 | ||
@@ -178,7 +181,9 @@ MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio, | |||
178 | #endif | 181 | #endif |
179 | #if CONFIG_CODEC == SWCODEC | 182 | #if CONFIG_CODEC == SWCODEC |
180 | ,&crossfeed_menu, &equalizer_menu, &dithering_enabled | 183 | ,&crossfeed_menu, &equalizer_menu, &dithering_enabled |
184 | #ifdef HAVE_PITCHSCREEN | ||
181 | ,×tretch_enabled | 185 | ,×tretch_enabled |
186 | #endif | ||
182 | ,&compressor_menu | 187 | ,&compressor_menu |
183 | #endif | 188 | #endif |
184 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) | 189 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) |
diff --git a/apps/plugin.c b/apps/plugin.c index 9b490d0fa9..193d02e034 100644 --- a/apps/plugin.c +++ b/apps/plugin.c | |||
@@ -544,8 +544,8 @@ static const struct plugin_api rockbox_api = { | |||
544 | #if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC) | 544 | #if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC) |
545 | mpeg_get_last_header, | 545 | mpeg_get_last_header, |
546 | #endif | 546 | #endif |
547 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) || \ | 547 | #if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) || \ |
548 | (CONFIG_CODEC == SWCODEC) | 548 | (CONFIG_CODEC == SWCODEC)) && defined (HAVE_PITCHSCREEN) |
549 | sound_set_pitch, | 549 | sound_set_pitch, |
550 | #endif | 550 | #endif |
551 | 551 | ||
diff --git a/apps/plugin.h b/apps/plugin.h index 499e1d657d..0b3a5b566f 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -678,8 +678,8 @@ struct plugin_api { | |||
678 | #if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC) | 678 | #if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC) |
679 | unsigned long (*mpeg_get_last_header)(void); | 679 | unsigned long (*mpeg_get_last_header)(void); |
680 | #endif | 680 | #endif |
681 | #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) || \ | 681 | #if ((CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) || \ |
682 | (CONFIG_CODEC == SWCODEC) | 682 | (CONFIG_CODEC == SWCODEC)) && defined (HAVE_PITCHSCREEN) |
683 | void (*sound_set_pitch)(int32_t pitch); | 683 | void (*sound_set_pitch)(int32_t pitch); |
684 | #endif | 684 | #endif |
685 | 685 | ||
diff --git a/apps/plugins/mpegplayer/audio_thread.c b/apps/plugins/mpegplayer/audio_thread.c index 106eac7f9e..9e3968007f 100644 --- a/apps/plugins/mpegplayer/audio_thread.c +++ b/apps/plugins/mpegplayer/audio_thread.c | |||
@@ -483,7 +483,9 @@ static void audio_thread(void) | |||
483 | 483 | ||
484 | td.dsp = (struct dsp_config *)rb->dsp_configure(NULL, DSP_MYDSP, | 484 | td.dsp = (struct dsp_config *)rb->dsp_configure(NULL, DSP_MYDSP, |
485 | CODEC_IDX_AUDIO); | 485 | CODEC_IDX_AUDIO); |
486 | #ifdef HAVE_PITCHSCREEN | ||
486 | rb->sound_set_pitch(PITCH_SPEED_100); | 487 | rb->sound_set_pitch(PITCH_SPEED_100); |
488 | #endif | ||
487 | rb->dsp_configure(td.dsp, DSP_RESET, 0); | 489 | rb->dsp_configure(td.dsp, DSP_RESET, 0); |
488 | rb->dsp_configure(td.dsp, DSP_SET_SAMPLE_DEPTH, MAD_F_FRACBITS); | 490 | rb->dsp_configure(td.dsp, DSP_SET_SAMPLE_DEPTH, MAD_F_FRACBITS); |
489 | 491 | ||
diff --git a/apps/settings.c b/apps/settings.c index 3b12274eae..7b0707b2f1 100644 --- a/apps/settings.c +++ b/apps/settings.c | |||
@@ -992,7 +992,9 @@ void settings_apply(bool read_disk) | |||
992 | } | 992 | } |
993 | 993 | ||
994 | dsp_dither_enable(global_settings.dithering_enabled); | 994 | dsp_dither_enable(global_settings.dithering_enabled); |
995 | #ifdef HAVE_PITCHSCREEN | ||
995 | dsp_timestretch_enable(global_settings.timestretch_enabled); | 996 | dsp_timestretch_enable(global_settings.timestretch_enabled); |
997 | #endif | ||
996 | dsp_set_compressor(global_settings.compressor_threshold, | 998 | dsp_set_compressor(global_settings.compressor_threshold, |
997 | global_settings.compressor_makeup_gain, | 999 | global_settings.compressor_makeup_gain, |
998 | global_settings.compressor_ratio, | 1000 | global_settings.compressor_ratio, |
diff --git a/apps/settings.h b/apps/settings.h index 24ff9ef62a..443369b77e 100644 --- a/apps/settings.h +++ b/apps/settings.h | |||
@@ -364,7 +364,9 @@ struct user_settings | |||
364 | int keyclick; /* keyclick volume */ | 364 | int keyclick; /* keyclick volume */ |
365 | int keyclick_repeats; /* keyclick on repeats */ | 365 | int keyclick_repeats; /* keyclick on repeats */ |
366 | bool dithering_enabled; | 366 | bool dithering_enabled; |
367 | #ifdef HAVE_PITCHSCREEN | ||
367 | bool timestretch_enabled; | 368 | bool timestretch_enabled; |
369 | #endif | ||
368 | #endif /* CONFIG_CODEC == SWCODEC */ | 370 | #endif /* CONFIG_CODEC == SWCODEC */ |
369 | 371 | ||
370 | #ifdef HAVE_RECORDING | 372 | #ifdef HAVE_RECORDING |
diff --git a/apps/settings_list.c b/apps/settings_list.c index 07450661c2..a8c3c36651 100644 --- a/apps/settings_list.c +++ b/apps/settings_list.c | |||
@@ -1371,9 +1371,11 @@ const struct settings_list settings[] = { | |||
1371 | OFFON_SETTING(F_SOUNDSETTING, dithering_enabled, LANG_DITHERING, false, | 1371 | OFFON_SETTING(F_SOUNDSETTING, dithering_enabled, LANG_DITHERING, false, |
1372 | "dithering enabled", dsp_dither_enable), | 1372 | "dithering enabled", dsp_dither_enable), |
1373 | 1373 | ||
1374 | #ifdef HAVE_PITCHSCREEN | ||
1374 | /* timestretch */ | 1375 | /* timestretch */ |
1375 | OFFON_SETTING(F_SOUNDSETTING, timestretch_enabled, LANG_TIMESTRETCH, false, | 1376 | OFFON_SETTING(F_SOUNDSETTING, timestretch_enabled, LANG_TIMESTRETCH, false, |
1376 | "timestretch enabled", dsp_timestretch_enable), | 1377 | "timestretch enabled", dsp_timestretch_enable), |
1378 | #endif | ||
1377 | 1379 | ||
1378 | /* compressor */ | 1380 | /* compressor */ |
1379 | INT_SETTING_NOWRAP(F_SOUNDSETTING, compressor_threshold, | 1381 | INT_SETTING_NOWRAP(F_SOUNDSETTING, compressor_threshold, |