I have a bunch of mp3 files (16). Each mp3 has less than 2 MB size and I am working with hp5450. I tried to load these files with
fp = fopen(mp3[i], “rb”);
printf(“File Not Found\n”);
fseek(fp, 0, SEEK_END);
length[i] = ftell(fp);
fseek(fp, 0, SEEK_SET);
data[i] = (char *)malloc(length[i]);
fread(data[i], length[i], 1, fp);
sound = FSOUND_Sample_Load(FSOUND_UNMANAGED, data[i],FSOUND_LOADMEMORY, 0, length[i]);
but it is very slow and it seems application never be initialized. I need mp3 files because their sizes are less than wave files and I need to have Doppler effect so it is not easy to implement this with streams. What do you recommend and is this a general problem to load mp3 file as a sample on PocketPCs?
Also I tried with this command
sample_audio[i] = FSOUND_Stream_GetSample(stream[i]);
to conver stream files to sample files and through this use dsp effect but it did not work; because sample data does not include all stream data and has less length than stream. Any solution …. ?
- You must login to post comments
Please login first to submit.