From 8f1d3c944b509874be07a1f12387de37adf12626 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 22 Jan 2003 18:47:35 +0000 Subject: Ludovic Lange's patch to make the ROLO feature work on the FM Recorder. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3151 a1c6a512-1295-4272-9138-f99709370657 --- firmware/rolo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'firmware/rolo.c') diff --git a/firmware/rolo.c b/firmware/rolo.c index 92c8cc4003..f8aad52546 100644 --- a/firmware/rolo.c +++ b/firmware/rolo.c @@ -68,8 +68,8 @@ int rolo_load(char* filename) } /* Read file length from header and compare to real file length */ - length=lseek(fd,0,SEEK_END)-6; - lseek(fd, 0, SEEK_SET); + length=lseek(fd,0,SEEK_END)-FIRMWARE_OFFSET_FILE_DATA; + lseek(fd, FIRMWARE_OFFSET_FILE_LENGTH, SEEK_SET); if(read(fd, &file_length, 4) != 4) { rolo_error("Error Reading File Length"); return -1; @@ -80,12 +80,12 @@ int rolo_load(char* filename) } /* Read and save checksum */ - lseek(fd, 4, SEEK_SET); + lseek(fd, FIRMWARE_OFFSET_FILE_CRC, SEEK_SET); if (read(fd, &file_checksum, 2) != 2) { rolo_error("Error Reading checksum"); return -1; } - lseek(fd, 6, SEEK_SET); + lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET); /* verify that file can be read and descrambled */ if ((&mp3buf[0] + (2*length)+4) >= &mp3end) { -- cgit v1.2.3