summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/mpegplayer.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-02-01 02:25:15 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-02-01 02:25:15 +0000
commitf90cbcb652af3bf794ec61d7f7ec3de00c8b7cb2 (patch)
tree62c13ffdeb5112181897103a6a015cfc1fab98ae /apps/plugins/mpegplayer/mpegplayer.h
parent7e402d8202af409a0ea8f3f2676a2e6f501af05b (diff)
downloadrockbox-f90cbcb652af3bf794ec61d7f7ec3de00c8b7cb2.tar.gz
rockbox-f90cbcb652af3bf794ec61d7f7ec3de00c8b7cb2.zip
mpegplayer: Use the core DSP to process audio. Removes the sample rate restriction on audio and any mpeg audio samplerate may be used. Use the global sound settings for audio output with the option to force any one of the processing stages off. All are forced off by default. I didn't personally care to fully duplicate the Sound Settings menu which would have been needed since using the core one would affect settings globally and exactly the same configuration probably isn't desired since the CPU load for video playback is much greater. Rebalance the threading to compensate with some expense to buffering speed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16194 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/mpegplayer.h')
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/apps/plugins/mpegplayer/mpegplayer.h b/apps/plugins/mpegplayer/mpegplayer.h
index 11bc1ea669..b92af38e6c 100644
--- a/apps/plugins/mpegplayer/mpegplayer.h
+++ b/apps/plugins/mpegplayer/mpegplayer.h
@@ -53,18 +53,19 @@ enum mpeg_malloc_reason_t
53#define AUDIOBUF_ALLOC_SIZE (AUDIOBUF_SIZE+AUDIOBUF_GUARD_SIZE) 53#define AUDIOBUF_ALLOC_SIZE (AUDIOBUF_SIZE+AUDIOBUF_GUARD_SIZE)
54 54
55/** PCM buffer **/ 55/** PCM buffer **/
56#define CLOCK_RATE 44100 /* Our clock rate in ticks/second (samplerate) */ 56#define CLOCK_RATE NATIVE_FREQUENCY /* Our clock rate in ticks/second (samplerate) */
57 57
58/* Define this as "1" to have a test tone instead of silence clip */ 58/* Define this as "1" to have a test tone instead of silence clip */
59#define SILENCE_TEST_TONE 0 59#define SILENCE_TEST_TONE 0
60 60
61#define PCMOUT_BUFSIZE (CLOCK_RATE) /* 1s */ 61#define PCMOUT_BUFSIZE (CLOCK_RATE/2*4) /* 1/2s */
62#define PCMOUT_GUARD_SIZE (1152*4 + sizeof (struct pcm_frame_header)) 62#define PCMOUT_GUARD_SAMPLES ((CLOCK_RATE*576+7999)/8000) /* Worst upsampling case */
63#define PCMOUT_ALLOC_SIZE (PCMOUT_BUFSIZE + PCMOUT_GUARD_SIZE) 63#define PCMOUT_GUARD_SIZE (PCMOUT_GUARD_SAMPLES*4 + sizeof (struct pcm_frame_header))
64 /* Start pcm playback @ 25% full */ 64#define PCMOUT_ALLOC_SIZE (PCMOUT_BUFSIZE + PCMOUT_GUARD_SIZE)
65#define PCMOUT_PLAY_WM (PCMOUT_BUFSIZE/4) 65 /* Start pcm playback @ 25% full */
66 /* No valid audio frame is smaller */ 66#define PCMOUT_PLAY_WM (PCMOUT_BUFSIZE/4)
67#define PCMOUT_LOW_WM (sizeof (struct pcm_frame_header)) 67 /* No valid audio frame is smaller */
68#define PCMOUT_LOW_WM (sizeof (struct pcm_frame_header))
68 69
69/** disk buffer **/ 70/** disk buffer **/
70#define DISK_BUF_LOW_WATERMARK (1024*1024) 71#define DISK_BUF_LOW_WATERMARK (1024*1024)