summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2005-10-06 21:19:18 +0000
committerDave Chapman <dave@dchapman.com>2005-10-06 21:19:18 +0000
commitda6c0a0e46e1e610c1d74d20ec816d0c95b4ab98 (patch)
tree6d5683f77ff79ad3835d46704e759d47ff9a264a
parent9e19c95d8efc78a22a32b4a77f9c4a0b4e64125c (diff)
downloadrockbox-da6c0a0e46e1e610c1d74d20ec816d0c95b4ab98.tar.gz
rockbox-da6c0a0e46e1e610c1d74d20ec816d0c95b4ab98.tar.bz2
rockbox-da6c0a0e46e1e610c1d74d20ec816d0c95b4ab98.zip
Fix channel-swapping bug in iriver recordings. Left and Right channels should now be correctly written to the WAV file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7585 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/pcm_record.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/pcm_record.c b/firmware/pcm_record.c
index cafbd71754..8480864513 100644
--- a/firmware/pcm_record.c
+++ b/firmware/pcm_record.c
@@ -349,12 +349,12 @@ void pcmrec_callback(bool flush)
{
if (num_ready >= WRITE_THRESHOLD || flush)
{
- unsigned long *ptr = (unsigned long*)rec_buffers[read_index];
+ unsigned short *ptr = (unsigned short*)rec_buffers[read_index];
int i;
- for (i=0; i<EACH_BUFFER_SIZE * num_ready / 4; i++)
+ for (i=0; i<EACH_BUFFER_SIZE * num_ready / 2; i++)
{
- *ptr = htole32(*ptr);
+ *ptr = htole16(*ptr);
ptr++;
}