diff options
Diffstat (limited to 'firmware/rolo.c')
-rw-r--r-- | firmware/rolo.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/firmware/rolo.c b/firmware/rolo.c index e2ef26b3aa..ca68596112 100644 --- a/firmware/rolo.c +++ b/firmware/rolo.c | |||
@@ -120,7 +120,7 @@ int rolo_load(const char* filename) | |||
120 | } | 120 | } |
121 | lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET); | 121 | lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET); |
122 | 122 | ||
123 | if (read(fd, mp3buf, length) != length) { | 123 | if (read(fd, audiobuf, length) != length) { |
124 | rolo_error("Error Reading File"); | 124 | rolo_error("Error Reading File"); |
125 | return -1; | 125 | return -1; |
126 | } | 126 | } |
@@ -128,7 +128,7 @@ int rolo_load(const char* filename) | |||
128 | checksum = 0; | 128 | checksum = 0; |
129 | 129 | ||
130 | for(i = 0;i < length;i++) { | 130 | for(i = 0;i < length;i++) { |
131 | checksum += mp3buf[i]; | 131 | checksum += audiobuf[i]; |
132 | } | 132 | } |
133 | 133 | ||
134 | /* Verify checksum against file header */ | 134 | /* Verify checksum against file header */ |
@@ -162,12 +162,12 @@ int rolo_load(const char* filename) | |||
162 | lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET); | 162 | lseek(fd, FIRMWARE_OFFSET_FILE_DATA, SEEK_SET); |
163 | 163 | ||
164 | /* verify that file can be read and descrambled */ | 164 | /* verify that file can be read and descrambled */ |
165 | if ((mp3buf + (2*length)+4) >= mp3end) { | 165 | if ((audiobuf + (2*length)+4) >= audiobufend) { |
166 | rolo_error("Not enough room to load file"); | 166 | rolo_error("Not enough room to load file"); |
167 | return -1; | 167 | return -1; |
168 | } | 168 | } |
169 | 169 | ||
170 | if (read(fd, &mp3buf[length], length) != (int)length) { | 170 | if (read(fd, &audiobuf[length], length) != (int)length) { |
171 | rolo_error("Error Reading File"); | 171 | rolo_error("Error Reading File"); |
172 | return -1; | 172 | return -1; |
173 | } | 173 | } |
@@ -175,7 +175,7 @@ int rolo_load(const char* filename) | |||
175 | lcd_puts(0, 1, "Descramble"); | 175 | lcd_puts(0, 1, "Descramble"); |
176 | lcd_update(); | 176 | lcd_update(); |
177 | 177 | ||
178 | checksum = descramble(mp3buf + length, mp3buf, length); | 178 | checksum = descramble(audiobuf + length, audiobuf, length); |
179 | 179 | ||
180 | /* Verify checksum against file header */ | 180 | /* Verify checksum against file header */ |
181 | if (checksum != file_checksum) { | 181 | if (checksum != file_checksum) { |
@@ -201,7 +201,7 @@ int rolo_load(const char* filename) | |||
201 | PAIOR = 0x0FA0; | 201 | PAIOR = 0x0FA0; |
202 | #endif | 202 | #endif |
203 | #endif | 203 | #endif |
204 | rolo_restart(mp3buf, ramstart, length); | 204 | rolo_restart(audiobuf, ramstart, length); |
205 | 205 | ||
206 | return 0; /* this is never reached */ | 206 | return 0; /* this is never reached */ |
207 | } | 207 | } |