diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-07-17 00:01:32 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-07-24 21:20:13 +0000 |
commit | 8cb555460ff79e636a7907fb2589e16db98c8600 (patch) | |
tree | 930a3878c7641c9ce045b24f0ade1309e36d5806 /apps/misc.c | |
parent | 0c4f89370d05056faa789aa9cabcccc4e509fb9f (diff) |
[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
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 @@ #include "bookmark.h" #include "wps.h" #include "playback.h" -#if CONFIG_CODEC == SWCODEC #include "voice_thread.h" -#else -#include "mp3_playback.h" -#endif #ifdef BOOTFILE #if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF) \ @@ -302,7 +298,7 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) #endif { bool batt_safe = battery_level_safe(); -#if CONFIG_CODEC != SWCODEC || defined(HAVE_RECORDING) +#if defined(HAVE_RECORDING) int audio_stat = audio_status(); #endif @@ -339,19 +335,12 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) splashf(0, "%s %s", str(LANG_WARNING_BATTERY_EMPTY), str(LANG_SHUTTINGDOWN)); } -#if CONFIG_CODEC != SWCODEC - if (global_settings.fade_on_stop - && (audio_stat & AUDIO_STATUS_PLAY)) - { - fade(false, false); - } -#endif #ifdef HAVE_DISK_STORAGE if (batt_safe) /* do not save on critical battery */ #endif { -#if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC +#if defined(HAVE_RECORDING) if (audio_stat & AUDIO_STATUS_RECORD) { rec_command(RECORDING_CMD_STOP); @@ -368,13 +357,7 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) if (callback != NULL) callback(parameter); -#if CONFIG_CODEC != SWCODEC - /* wait for audio_stop or audio_stop_recording to complete */ - while (audio_status()) - sleep(1); -#endif - -#if defined(HAVE_RECORDING) && CONFIG_CODEC == SWCODEC +#if defined(HAVE_RECORDING) audio_close_recording(); #endif scrobbler_shutdown(true); @@ -403,9 +386,7 @@ static bool clean_shutdown(void (*callback)(void *), void *parameter) enqueue = true; } talk_id(LANG_SHUTTINGDOWN, enqueue); -#if CONFIG_CODEC == SWCODEC voice_wait(); -#endif } shutdown_hw(); @@ -426,10 +407,6 @@ bool list_stop_handler(void) { if (!global_settings.party_mode) { -#if CONFIG_CODEC != SWCODEC - if (global_settings.fade_on_stop) - fade(false, false); -#endif bookmark_autobookmark(true); audio_stop(); ret = true; /* bookmarking can make a refresh necessary */ @@ -894,7 +871,6 @@ char *strip_extension(char* buffer, int buffer_size, const char *filename) return buffer; } -#if CONFIG_CODEC == SWCODEC /* Play a standard sound */ void system_sound_play(enum system_sound sound) { @@ -1046,7 +1022,6 @@ void replaygain_update(void) settings.type = replaygain_setting_mode(settings.type); dsp_replaygain_set_settings(&settings); } -#endif /* CONFIG_CODEC == SWCODEC */ /* format a sound value like: -1.05 dB */ int format_sound_value(char *buf, size_t size, int snd, int val) |