Fix stereo Speex file decoding.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12250 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dan Everton 2007-02-10 06:11:30 +00:00
parent 161bf8f0e1
commit 69c40d7e84

View file

@ -544,15 +544,14 @@ next_page:
if (speex_bits_remaining(&vf) < 0)
break;
if (channels==2)
speex_decode_stereo_int(output, frame_size,&stereo);
{
if (channels == 2)
speex_decode_stereo_int(output, frame_size, &stereo);
int new_frame_size = frame_size;
if (new_frame_size>0){
rb->pcmbuf_insert((const char*)output,
(const char*)output,
new_frame_size*channels);
rb->pcmbuf_insert((const char*)output, NULL,
new_frame_size);
/* 2 bytes/sample */
cur_granule += new_frame_size / 2;
@ -564,7 +563,6 @@ next_page:
}
}
}
}
packet_count++;
}
}