summaryrefslogtreecommitdiffstats
path: root/firmware/pcm_record.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2005-10-06 19:27:43 +0000
committerDave Chapman <dave@dchapman.com>2005-10-06 19:27:43 +0000
commit9e19c95d8efc78a22a32b4a77f9c4a0b4e64125c (patch)
tree1d0bc7970de2cd2f4fa365614f84f12517ad1b5f /firmware/pcm_record.c
parent1c3a83c44e6dd18990d813c2f12e83bab67f313a (diff)
downloadrockbox-9e19c95d8efc78a22a32b4a77f9c4a0b4e64125c.tar.gz
rockbox-9e19c95d8efc78a22a32b4a77f9c4a0b4e64125c.tar.bz2
rockbox-9e19c95d8efc78a22a32b4a77f9c4a0b4e64125c.zip
Replace SWAB16 and SWAB32 with a comprehensive set of byte-swap macros - letoh16, letoh32, htole16, htole32, betoh16, betoh32, htobe16 and htobe32
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7584 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/pcm_record.c')
-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 6eb7bbcba8..cafbd71754 100644
--- a/firmware/pcm_record.c
+++ b/firmware/pcm_record.c
@@ -354,7 +354,7 @@ void pcmrec_callback(bool flush)
for (i=0; i<EACH_BUFFER_SIZE * num_ready / 4; i++)
{
- *ptr = SWAB32(*ptr);
+ *ptr = htole32(*ptr);
ptr++;
}
@@ -476,11 +476,11 @@ static void close_wave(void)
{
long l;
- l = SWAB32(num_rec_bytes + 36);
+ l = htole32(num_rec_bytes + 36);
lseek(wav_file, 4, SEEK_SET);
write(wav_file, &l, 4);
- l = SWAB32(num_rec_bytes);
+ l = htole32(num_rec_bytes);
lseek(wav_file, 40, SEEK_SET);
write(wav_file, &l, 4);