summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/id3.h2
-rw-r--r--firmware/pcm_playback.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/firmware/export/id3.h b/firmware/export/id3.h
index 8fd41a1286..8f904e49e6 100644
--- a/firmware/export/id3.h
+++ b/firmware/export/id3.h
@@ -25,7 +25,7 @@
/* Audio file types. */
/* NOTE: When adding new audio types, also add to codec_labels[] in id3.c */
enum {
- AFMT_UNKNOWN = 0, /* Unknown file format */
+ AFMT_UNKNOWN = 1, /* Unknown file format */
#if CONFIG_HWCODEC==MASNONE
AFMT_MPA_L1, /* MPEG Audio layer 1 */
diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c
index 298d2e7874..a58069d5f1 100644
--- a/firmware/pcm_playback.c
+++ b/firmware/pcm_playback.c
@@ -127,7 +127,7 @@ void pcm_boost(bool state)
{
static bool boost_state = false;
- if (crossfade_active || boost_mode)
+ if (crossfade_init || crossfade_active || boost_mode)
return ;
if (state != boost_state) {
@@ -158,6 +158,7 @@ static void dma_stop(void)
next_start = NULL;
next_size = 0;
crossfade_init = 0;
+ crossfade_active = 0;
pcm_paused = false;
}
@@ -255,13 +256,12 @@ void pcm_play_data(const unsigned char* start, int size,
void pcm_play_stop(void)
{
- crossfade_active = false;
- pcm_set_boost_mode(false);
- pcm_boost(false);
if (pcm_playing) {
uda1380_mute(true);
dma_stop();
}
+ pcm_set_boost_mode(false);
+ pcm_boost(false);
}
void pcm_play_pause(bool play)
@@ -436,6 +436,7 @@ bool pcm_crossfade_init(void)
return false;
}
logf("crossfading!");
+ pcm_boost(true);
crossfade_mode = CFM_CROSSFADE;
crossfade_init = true;