[quote:1hh6tmk6]FSOUND_SAMPLE* convertSample(short int PCM_Data, long numSamples)
FSOUND_SAMPLE* sample; sample = FSOUND_Sample_Alloc(FSOUND_UNMANAGED, numSamples, FSOUND_STEREO | FSOUND_16BITS, 44100, 255, 128, 255); FSOUND_Sample_Upload(sample, PCM_Data, FSOUND_STEREO | FSOUND_16BITS); return sample;
this worked before but doesn’t now. the key difference is this:
last time i read the data from a wave file into a short int array whose size was the amount of bytes the data was.
but i wanted each element in the array to be 1 sample of data so now what i’m doing is dividing the size of the data by the block alignment (which is usually 4) and using this value as the size of the array.
unfortunately FMOD doesn’t seem to like this and crashes at the upload function call. any ideas?
- BruceLeroy asked 13 years ago
- You must login to post comments