summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/mpegplayer.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-01-07 05:17:28 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-01-07 05:17:28 +0000
commit39107956ab680b37ade979e5379cf98a06604b13 (patch)
tree156c4197b5ad0d99c165e07d81da7a3e1d3671b1 /apps/plugins/mpegplayer/mpegplayer.h
parentb1a1831a17b17574b8a201dfcb348714772068b8 (diff)
downloadrockbox-39107956ab680b37ade979e5379cf98a06604b13.zip
rockbox-39107956ab680b37ade979e5379cf98a06604b13.tar.gz
rockbox-39107956ab680b37ade979e5379cf98a06604b13.tar.bz2
rockbox-39107956ab680b37ade979e5379cf98a06604b13.tar.xz
MPEGPlyaer: A bit of audio mutation. Remove a useless thread state. Take some control over the buffer away from the audio thread itself. Some atomicity corrections.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28984 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/mpegplayer.h')
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.h b/apps/plugins/mpegplayer/mpegplayer.h
index 79c25f6..7333d87 100644
--- a/apps/plugins/mpegplayer/mpegplayer.h
+++ b/apps/plugins/mpegplayer/mpegplayer.h
@@ -51,14 +51,13 @@
/* Define this as "1" to have a test tone instead of silence clip */
#define SILENCE_TEST_TONE 0
+/* NOTE: Sizes make no frame header allowance when considering duration */
#define PCMOUT_BUFSIZE (CLOCK_RATE/2*4) /* 1/2s */
-#define PCMOUT_GUARD_SAMPLES ((CLOCK_RATE*576+7999)/8000) /* Worst upsampling case */
-#define PCMOUT_GUARD_SIZE (PCMOUT_GUARD_SAMPLES*4 + sizeof (struct pcm_frame_header))
+#define PCMOUT_GUARD_SIZE (PCMOUT_BUFSIZE) /* guarantee contiguous sizes */
#define PCMOUT_ALLOC_SIZE (PCMOUT_BUFSIZE + PCMOUT_GUARD_SIZE)
/* Start pcm playback @ 25% full */
#define PCMOUT_PLAY_WM (PCMOUT_BUFSIZE/4)
- /* No valid audio frame is smaller */
-#define PCMOUT_LOW_WM (sizeof (struct pcm_frame_header))
+#define PCMOUT_LOW_WM (0)
/** disk buffer **/
#define DISK_BUF_LOW_WATERMARK (1024*1024)