Answered
0
0

Here is soundtouch code about process the byte array. Did fmod has some api like this?(putSamples/receiveSamples)

private byte[] process(byte[] data, int readsize) throws IOException {
SoundTouch soundTouch = new SoundTouch();
// set parameter
short[] shortData = Utils.byteToShort(data, readsize);
soundTouch.putSamples(shortData, shortData.length);
while (true) {
buffer = Utils.shortToByte(soundTouch.receiveSamples());
if (buffer.length != 0) {
//do sth
} else {
break;
}
soundTouch.close();
}

  • You must to post comments
Best Answer
0
0

Depending on what you are wanting to do, you may want to either use FMOD::Sound::readData or FMOD::Sound::lock

https://fmod.com/resources/documentation-api?page=content/generated/FMOD_Sound_ReadData.html

https://fmod.com/resources/documentation-api?page=content/generated/FMOD_Sound_Lock.html

These are also used in our LowLevel examples if you wanted to see them being used.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.