diff options
Diffstat (limited to 'apps/misc.c')
-rw-r--r-- | apps/misc.c | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/apps/misc.c b/apps/misc.c index 2e3292dba5..b20a0095ab 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -91,11 +91,7 @@ | |||
91 | #include "bookmark.h" | 91 | #include "bookmark.h" |
92 | #include "wps.h" | 92 | #include "wps.h" |
93 | #include "playback.h" | 93 | #include "playback.h" |
94 | #if CONFIG_CODEC == SWCODEC | ||
95 | #include "voice_thread.h" | 94 | #include "voice_thread.h" |
96 | #else | ||
97 | #include "mp3_playback.h" | ||
98 | #endif | ||
99 | 95 | ||
100 | #ifdef BOOTFILE | 96 | #ifdef BOOTFILE |
101 | #if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF) \ | 97 | #if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF) \ |
@@ -302,7 +298,7 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) | |||
302 | #endif | 298 | #endif |
303 | { | 299 | { |
304 | bool batt_safe = battery_level_safe(); | 300 | bool batt_safe = battery_level_safe(); |
305 | #if CONFIG_CODEC != SWCODEC || defined(HAVE_RECORDING) | 301 | #if defined(HAVE_RECORDING) |
306 | int audio_stat = audio_status(); | 302 | int audio_stat = audio_status(); |
307 | #endif | 303 | #endif |
308 | 304 | ||
@@ -339,19 +335,12 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) | |||
339 | splashf(0, "%s %s", str(LANG_WARNING_BATTERY_EMPTY), | 335 | splashf(0, "%s %s", str(LANG_WARNING_BATTERY_EMPTY), |
340 | str(LANG_SHUTTINGDOWN)); | 336 | str(LANG_SHUTTINGDOWN)); |
341 | } | 337 | } |
342 | #if CONFIG_CODEC != SWCODEC | ||
343 | if (global_settings.fade_on_stop | ||
344 | && (audio_stat & AUDIO_STATUS_PLAY)) | ||
345 | { | ||
346 | fade(false, false); | ||
347 | } | ||
348 | #endif | ||
349 | 338 | ||
350 | #ifdef HAVE_DISK_STORAGE | 339 | #ifdef HAVE_DISK_STORAGE |
351 | if (batt_safe) /* do not save on critical battery */ | 340 | if (batt_safe) /* do not save on critical battery */ |
352 | #endif | 341 | #endif |
353 | { | 342 | { |
354 | #if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC | 343 | #if defined(HAVE_RECORDING) |
355 | if (audio_stat & AUDIO_STATUS_RECORD) | 344 | if (audio_stat & AUDIO_STATUS_RECORD) |
356 | { | 345 | { |
357 | rec_command(RECORDING_CMD_STOP); | 346 | rec_command(RECORDING_CMD_STOP); |
@@ -368,13 +357,7 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) | |||
368 | if (callback != NULL) | 357 | if (callback != NULL) |
369 | callback(parameter); | 358 | callback(parameter); |
370 | 359 | ||
371 | #if CONFIG_CODEC != SWCODEC | 360 | #if defined(HAVE_RECORDING) |
372 | /* wait for audio_stop or audio_stop_recording to complete */ | ||
373 | while (audio_status()) | ||
374 | sleep(1); | ||
375 | #endif | ||
376 | |||
377 | #if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC | ||
378 | audio_close_recording(); | 361 | audio_close_recording(); |
379 | #endif | 362 | #endif |
380 | scrobbler_shutdown(true); | 363 | scrobbler_shutdown(true); |
@@ -403,9 +386,7 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) | |||
403 | enqueue = true; | 386 | enqueue = true; |
404 | } | 387 | } |
405 | talk_id(LANG_SHUTTINGDOWN, enqueue); | 388 | talk_id(LANG_SHUTTINGDOWN, enqueue); |
406 | #if CONFIG_CODEC == SWCODEC | ||
407 | voice_wait(); | 389 | voice_wait(); |
408 | #endif | ||
409 | } | 390 | } |
410 | 391 | ||
411 | shutdown_hw(); | 392 | shutdown_hw(); |
@@ -426,10 +407,6 @@ bool list_stop_handler(void) | |||
426 | { | 407 | { |
427 | if (!global_settings.party_mode) | 408 | if (!global_settings.party_mode) |
428 | { | 409 | { |
429 | #if CONFIG_CODEC != SWCODEC | ||
430 | if (global_settings.fade_on_stop) | ||
431 | fade(false, false); | ||
432 | #endif | ||
433 | bookmark_autobookmark(true); | 410 | bookmark_autobookmark(true); |
434 | audio_stop(); | 411 | audio_stop(); |
435 | ret = true; /* bookmarking can make a refresh necessary */ | 412 | ret = true; /* bookmarking can make a refresh necessary */ |
@@ -894,7 +871,6 @@ char *strip_extension(char* buffer, int buffer_size, const char *filename) | |||
894 | return buffer; | 871 | return buffer; |
895 | } | 872 | } |
896 | 873 | ||
897 | #if CONFIG_CODEC == SWCODEC | ||
898 | /* Play a standard sound */ | 874 | /* Play a standard sound */ |
899 | void system_sound_play(enum system_sound sound) | 875 | void system_sound_play(enum system_sound sound) |
900 | { | 876 | { |
@@ -1046,7 +1022,6 @@ void replaygain_update(void) | |||
1046 | settings.type = replaygain_setting_mode(settings.type); | 1022 | settings.type = replaygain_setting_mode(settings.type); |
1047 | dsp_replaygain_set_settings(&settings); | 1023 | dsp_replaygain_set_settings(&settings); |
1048 | } | 1024 | } |
1049 | #endif /* CONFIG_CODEC == SWCODEC */ | ||
1050 | 1025 | ||
1051 | /* format a sound value like: -1.05 dB */ | 1026 | /* format a sound value like: -1.05 dB */ |
1052 | int format_sound_value(char *buf, size_t size, int snd, int val) | 1027 | int format_sound_value(char *buf, size_t size, int snd, int val) |