2002-05-02 22:58:12 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
FILE *f;
|
|
|
|
int i;
|
2002-05-03 13:13:21 +00:00
|
|
|
unsigned char buf[128000];
|
2002-05-02 22:58:12 +00:00
|
|
|
|
|
|
|
f = fopen("mp.mp3", "r");
|
|
|
|
|
|
|
|
if(f)
|
|
|
|
{
|
2010-01-03 10:35:31 +00:00
|
|
|
if(fread(buf, 1, 128000, f) < 128000)
|
|
|
|
{
|
|
|
|
fprintf(stderr, "FAN!\n");
|
|
|
|
exit(1);
|
|
|
|
}
|
2002-05-02 22:58:12 +00:00
|
|
|
|
2010-01-03 10:35:31 +00:00
|
|
|
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");
|
2002-05-02 22:58:12 +00:00
|
|
|
}
|
|
|
|
}
|