summaryrefslogtreecommitdiff
path: root/firmware/rolo.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-04-05 11:33:58 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-04-05 11:33:58 +0000
commitd34865a5307e7bf91d986036797423975ac828b4 (patch)
tree41dcc1775f6cdc1d655f1eddadaabdf90c7ac22f /firmware/rolo.c
parent6cf9d51b3374cdc436c45f165a10f607832126ee (diff)
downloadrockbox-d34865a5307e7bf91d986036797423975ac828b4.tar.gz
rockbox-d34865a5307e7bf91d986036797423975ac828b4.zip
mp3buf renamed to audiobuf
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6252 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/rolo.c')
-rw-r--r--firmware/rolo.c12
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}