diff options
-rw-r--r-- | firmware/export/mpeg.h | 1 | ||||
-rw-r--r-- | firmware/mpeg.c | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/firmware/export/mpeg.h b/firmware/export/mpeg.h index 6b44363f8f..e971aaac33 100644 --- a/firmware/export/mpeg.h +++ b/firmware/export/mpeg.h | |||
@@ -26,6 +26,7 @@ | |||
26 | wouldn't be able to see the difference between | 26 | wouldn't be able to see the difference between |
27 | an empty buffer and a full one. */ | 27 | an empty buffer and a full one. */ |
28 | #define MPEG_LOW_WATER 0x60000 | 28 | #define MPEG_LOW_WATER 0x60000 |
29 | #define MPEG_RECORDING_LOW_WATER 0x80000 | ||
29 | #define MPEG_LOW_WATER_CHUNKSIZE 0x40000 | 30 | #define MPEG_LOW_WATER_CHUNKSIZE 0x40000 |
30 | #define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000 | 31 | #define MPEG_LOW_WATER_SWAP_CHUNKSIZE 0x10000 |
31 | #define MPEG_PLAY_PENDING_THRESHOLD 0x10000 | 32 | #define MPEG_PLAY_PENDING_THRESHOLD 0x10000 |
diff --git a/firmware/mpeg.c b/firmware/mpeg.c index 30530ed85b..85f9c72a25 100644 --- a/firmware/mpeg.c +++ b/firmware/mpeg.c | |||
@@ -854,7 +854,7 @@ static void dma_tick(void) | |||
854 | if(num_bytes < 0) | 854 | if(num_bytes < 0) |
855 | num_bytes += mp3buflen; | 855 | num_bytes += mp3buflen; |
856 | 856 | ||
857 | if(mp3buflen - num_bytes < MPEG_LOW_WATER && !saving) | 857 | if(mp3buflen - num_bytes < MPEG_RECORDING_LOW_WATER && !saving) |
858 | { | 858 | { |
859 | saving = true; | 859 | saving = true; |
860 | queue_post(&mpeg_queue, MPEG_SAVE_DATA, 0); | 860 | queue_post(&mpeg_queue, MPEG_SAVE_DATA, 0); |
@@ -1940,7 +1940,8 @@ static void mpeg_thread(void) | |||
1940 | or if we should stop recording */ | 1940 | or if we should stop recording */ |
1941 | if(amount_to_save) | 1941 | if(amount_to_save) |
1942 | { | 1942 | { |
1943 | if(mp3buflen - amount_to_save < MPEG_LOW_WATER || | 1943 | if(mp3buflen - |
1944 | amount_to_save < MPEG_RECORDING_LOW_WATER || | ||
1944 | stop_pending) | 1945 | stop_pending) |
1945 | { | 1946 | { |
1946 | int rc; | 1947 | int rc; |