diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/pcm_playback.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/firmware/pcm_playback.c b/firmware/pcm_playback.c index e5d6f4218b..a5c1deb371 100644 --- a/firmware/pcm_playback.c +++ b/firmware/pcm_playback.c | |||
@@ -234,7 +234,7 @@ void pcm_play_stop(void) | |||
234 | pcmbuf_unplayed_bytes = 0; | 234 | pcmbuf_unplayed_bytes = 0; |
235 | next_start = NULL; | 235 | next_start = NULL; |
236 | next_size = 0; | 236 | next_size = 0; |
237 | pcm_boost(false); | 237 | pcm_set_boost_mode(false); |
238 | } | 238 | } |
239 | 239 | ||
240 | void pcm_play_pause(bool play) | 240 | void pcm_play_pause(bool play) |
@@ -252,6 +252,7 @@ void pcm_play_pause(bool play) | |||
252 | IIS2CONFIG = 0x800; | 252 | IIS2CONFIG = 0x800; |
253 | pcm_paused = true; | 253 | pcm_paused = true; |
254 | } | 254 | } |
255 | pcm_boost(false); | ||
255 | } | 256 | } |
256 | 257 | ||
257 | bool pcm_is_playing(void) | 258 | bool pcm_is_playing(void) |
@@ -348,9 +349,8 @@ void pcm_watermark_callback(int bytes_left) | |||
348 | 349 | ||
349 | void pcm_set_boost_mode(bool state) | 350 | void pcm_set_boost_mode(bool state) |
350 | { | 351 | { |
351 | boost_mode = state; | 352 | boost_mode = state; |
352 | if (boost_mode) | 353 | pcm_boost(state); |
353 | pcm_boost(true); | ||
354 | } | 354 | } |
355 | 355 | ||
356 | void audiobuffer_add_event(void (*event_handler)(void)) | 356 | void audiobuffer_add_event(void (*event_handler)(void)) |
@@ -385,7 +385,7 @@ bool pcm_is_lowdata(void) | |||
385 | 385 | ||
386 | void pcm_crossfade_start(void) | 386 | void pcm_crossfade_start(void) |
387 | { | 387 | { |
388 | if (audiobuffer_free > CHUNK_SIZE * 4) { | 388 | if (audiobuffer_free > CHUNK_SIZE * 4 || !crossfade_enabled) { |
389 | return ; | 389 | return ; |
390 | } | 390 | } |
391 | pcm_boost(true); | 391 | pcm_boost(true); |
@@ -433,7 +433,7 @@ bool audiobuffer_insert(char *buf, size_t length) | |||
433 | } | 433 | } |
434 | 434 | ||
435 | while (length > 0) { | 435 | while (length > 0) { |
436 | if (crossfade_enabled && crossfade_active) { | 436 | if (crossfade_active) { |
437 | copy_n = MIN(length, PCMBUF_SIZE - (unsigned int)crossfade_pos); | 437 | copy_n = MIN(length, PCMBUF_SIZE - (unsigned int)crossfade_pos); |
438 | 438 | ||
439 | crossfade((short *)&audiobuffer[crossfade_pos], | 439 | crossfade((short *)&audiobuffer[crossfade_pos], |