forked from len0rd/rockbox
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
This commit is contained in:
parent
6f9a84c2b8
commit
bdf558ca53
2 changed files with 4 additions and 4 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue