diff options
author | Jeffrey Goode <jeffg7@gmail.com> | 2009-08-15 14:36:49 +0000 |
---|---|---|
committer | Jeffrey Goode <jeffg7@gmail.com> | 2009-08-15 14:36:49 +0000 |
commit | 0fe4417da85fc2189b45b712d3a6a7e842300f4c (patch) | |
tree | c9807fb3ffbc1e3aaff309bd21527697e0c0abce | |
parent | ac77c08f11205fddaed93b53d07c803dd445d88f (diff) | |
download | rockbox-0fe4417da85fc2189b45b712d3a6a7e842300f4c.tar.gz rockbox-0fe4417da85fc2189b45b712d3a6a7e842300f4c.zip |
FS#10526: mpegplayer audio out of sync, reverts r22280
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22321 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/mpegplayer/audio_thread.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/apps/plugins/mpegplayer/audio_thread.c b/apps/plugins/mpegplayer/audio_thread.c index d04257ac30..a901b721d8 100644 --- a/apps/plugins/mpegplayer/audio_thread.c +++ b/apps/plugins/mpegplayer/audio_thread.c @@ -643,8 +643,8 @@ static void audio_thread(void) struct pcm_frame_header *dst_hdr = pcm_output_get_buffer(); const char *src[2] = { (char *)synth.pcm.samples[0], (char *)synth.pcm.samples[1] }; - int out_count = rb->dsp_output_count(td.dsp, (synth.pcm.length * - CLOCK_RATE + (td.samplerate - 1)) / td.samplerate); + int out_count = (synth.pcm.length * CLOCK_RATE + + (td.samplerate - 1)) / td.samplerate; ssize_t size = sizeof(*dst_hdr) + out_count*4; /* Wait for required amount of free buffer space */ @@ -657,17 +657,8 @@ static void audio_thread(void) goto message_process; } - int inp_count = rb->dsp_input_count(td.dsp, out_count); - - if (inp_count <= 0) - break; - - /* Input size has grown, no error, just don't write more than length */ - if (inp_count > synth.pcm.length) - inp_count = synth.pcm.length; - out_count = rb->dsp_process(td.dsp, dst_hdr->data, src, - inp_count); + synth.pcm.length); if (out_count <= 0) break; |