diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-02-16 12:01:35 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-02-16 12:01:35 +0000 |
commit | 09186e31ae4409f50c1437911a413c36b381f3a4 (patch) | |
tree | cec1d61ef397682a6dadf9ff6aaca29ccea4aae0 /apps/playback.c | |
parent | 6ffd8043cbdbf6c092ac7eb689863a02dc9840ff (diff) | |
download | rockbox-09186e31ae4409f50c1437911a413c36b381f3a4.tar.gz rockbox-09186e31ae4409f50c1437911a413c36b381f3a4.zip |
SWCODEC: Remove the last quirks when upsampling.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12336 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/apps/playback.c b/apps/playback.c index caaaddec6e..aa21ccc39b 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -1047,14 +1047,8 @@ static bool voice_pcmbuf_insert_callback( | |||
1047 | * against resampling buffer overflows. */ | 1047 | * against resampling buffer overflows. */ |
1048 | inp_count = dsp_input_count(out_count); | 1048 | inp_count = dsp_input_count(out_count); |
1049 | 1049 | ||
1050 | if (inp_count <= 0) | 1050 | if (inp_count <= 0) |
1051 | { | 1051 | return true; |
1052 | DEBUGF("Error: dsp_input_count(%ld=dsp_output_count(%ld))=%ld<=0\n", | ||
1053 | out_count, count, inp_count); | ||
1054 | /* If this happens, there are samples of codec data that don't | ||
1055 | * become a number of pcm samples, and something is broken */ | ||
1056 | return false; | ||
1057 | } | ||
1058 | 1052 | ||
1059 | /* Input size has grown, no error, just don't write more than length */ | 1053 | /* Input size has grown, no error, just don't write more than length */ |
1060 | if (inp_count > count) | 1054 | if (inp_count > count) |
@@ -1062,6 +1056,9 @@ static bool voice_pcmbuf_insert_callback( | |||
1062 | 1056 | ||
1063 | out_count = dsp_process(dest, src, inp_count); | 1057 | out_count = dsp_process(dest, src, inp_count); |
1064 | 1058 | ||
1059 | if (out_count <= 0) | ||
1060 | return true; | ||
1061 | |||
1065 | if (playing) | 1062 | if (playing) |
1066 | { | 1063 | { |
1067 | pcmbuf_mix_voice(out_count); | 1064 | pcmbuf_mix_voice(out_count); |
@@ -1329,14 +1326,8 @@ static bool codec_pcmbuf_insert_callback( | |||
1329 | * against resampling buffer overflows. */ | 1326 | * against resampling buffer overflows. */ |
1330 | inp_count = dsp_input_count(out_count); | 1327 | inp_count = dsp_input_count(out_count); |
1331 | 1328 | ||
1332 | if (inp_count <= 0) | 1329 | if (inp_count <= 0) |
1333 | { | 1330 | return true; |
1334 | DEBUGF("Error: dsp_input_count(%ld=dsp_output_count(%ld))=%ld<=0\n", | ||
1335 | out_count, count, inp_count); | ||
1336 | /* If this happens, there are samples of codec data that don't | ||
1337 | * become a number of pcm samples, and something is broken */ | ||
1338 | return false; | ||
1339 | } | ||
1340 | 1331 | ||
1341 | /* Input size has grown, no error, just don't write more than length */ | 1332 | /* Input size has grown, no error, just don't write more than length */ |
1342 | if (inp_count > count) | 1333 | if (inp_count > count) |
@@ -1344,6 +1335,9 @@ static bool codec_pcmbuf_insert_callback( | |||
1344 | 1335 | ||
1345 | out_count = dsp_process(dest, src, inp_count); | 1336 | out_count = dsp_process(dest, src, inp_count); |
1346 | 1337 | ||
1338 | if (out_count <= 0) | ||
1339 | return true; | ||
1340 | |||
1347 | pcmbuf_write_complete(out_count); | 1341 | pcmbuf_write_complete(out_count); |
1348 | 1342 | ||
1349 | #ifdef PLAYBACK_VOICE | 1343 | #ifdef PLAYBACK_VOICE |