hi all,
Well, I tryed to load a sample using FSOUND_Sample_Load, which take some time on my pocketpc, but the function return “An invalid parameter was passed to this function” when loading an MP3, Wavs work fine.
Can someone help me?
I tried many parameter but none is working.

after that, I’ld like to access the data using this code :
typedef signed short AUDIO;

AUDIO GetAmplitudeAtOffset(FSOUND_SAMPLE *sptr, int offset)
// The value we will be returning.
AUDIO amplitude = 0;

// Calculate the offset in bytes, since FSOUND_Sample_Lock uses bytes. 
int offsetBytes = offset * sizeof(AUDIO); 

// The lock information. 
void *ptr1 = NULL, *ptr2 = NULL; 
unsigned int len1 = 0, len2 = 0; 

// Do the lock. 
if (FSOUND_Sample_Lock(sptr, offsetBytes, sizeof(AUDIO), &ptr1, &ptr2, &len1, &len2)) 
    // Dereference the pointer to get the data. 
    amplitude = *((AUDIO *)ptr1); 

    // Unlock. 
    FSOUND_Sample_Unlock(sptr, ptr1, ptr2, len1, len2); 

// Finished. 
return amplitude; 


I found this piece of code on this forum, but it always return me “0”, please help! :(

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.