rockbox/firmware/test/i2c/gendata.c
Linus Nielsen Feltzing 1ba5d1f6b6 Doubled the buffer size
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@409 a1c6a512-1295-4272-9138-f99709370657
2002-05-03 13:13:21 +00:00

31 lines
481 B
C

#include <stdio.h>
int main(int argc, char *argv[])
{
FILE *f;
int i;
unsigned char buf[128000];
f = fopen("mp.mp3", "r");
if(f)
{
if(fread(buf, 1, 128000, f) < 128000)
{
fprintf(stderr, "FAN!\n");
exit(1);
}
printf("int mp3datalen = 128000;\n");
printf("unsigned char mp3data[128000] =\n{");
for(i = 0;i < 128000;i++)
{
if(i % 8 == 0)
{
printf("\n");
}
printf("0x%02x, ", buf[i]);
}
printf("};\n");
}
}