diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2005-10-22 21:07:35 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2005-10-22 21:07:35 +0000 |
| commit | bdf558ca53f293aa112c36b7662a092abdc9f5d5 (patch) | |
| tree | f3acccdb3281a66d8f2d4996d93cca05f053d81c /apps | |
| parent | 6f9a84c2b872c1a7c5e73869a6e0f2a0353b3efa (diff) | |
| download | rockbox-bdf558ca53f293aa112c36b7662a092abdc9f5d5.zip rockbox-bdf558ca53f293aa112c36b7662a092abdc9f5d5.tar.gz rockbox-bdf558ca53f293aa112c36b7662a092abdc9f5d5.tar.bz2 rockbox-bdf558ca53f293aa112c36b7662a092abdc9f5d5.tar.xz | |
Fixed the voice codec when no audio is playing. Now attenuating audio
instead of making the voice louder.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7653 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/pcmbuf.c | 2 | ||||
| -rw-r--r-- | apps/playback.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c index b67e889..8ab4ffa 100644 --- a/apps/pcmbuf.c +++ b/apps/pcmbuf.c @@ -652,7 +652,7 @@ void pcmbuf_mix(char *buf, long length) length /= 2; while (length-- > 0) { - obuf[mixpos] = MIN(MAX(obuf[mixpos] + *ibuf*4, -32768), 32767); + obuf[mixpos] = MIN(MAX(obuf[mixpos]/4 + *ibuf, -32768), 32767); ibuf++; mixpos++; diff --git a/apps/playback.c b/apps/playback.c index 7c3d63c..99d58d8 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -297,13 +297,13 @@ bool codec_pcmbuf_insert_split_callback(void *ch1, void *ch2, while (length > 0) { /* This will prevent old audio from playing when skipping tracks. */ - if (ci.reload_codec || ci.stop_codec) + if ((ci.reload_codec || ci.stop_codec) && current_codec != CODEC_IDX_VOICE) return true; while ((dest = pcmbuf_request_buffer(dsp_output_size(length), &output_size)) == NULL) { sleep(1); - if (ci.reload_codec || ci.stop_codec) + if ((ci.reload_codec || ci.stop_codec) && current_codec != CODEC_IDX_VOICE) return true; } @@ -1676,7 +1676,7 @@ void audio_thread(void) playlist_update_resume_info(audio_current_track()); - /* If there are no tracks in the playlist, then the playlist + /* If there are no tracks in the playlist, then the playlist was empty or none of the filenames were valid. No point in playing an empty playlist. */ if (playlist_amount() == 0) { |