Hi All,

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”);
if (!fp)
printf(“File Not Found\n”);
return 1;
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 to post comments

In Sample mode , setting parameters like Min-Max distance, Mode,…. is done easily but there is no command for streams that does the same work. Also how is it possible to set 3D attributes for streams?

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.