0
0

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(“Error!\n”);
printf(“File Not Found\n”);
FSOUND_Close();
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);
fclose(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 …. ?

Parisa

  • You must to post comments
0
0

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.