0
0

I’ve created an Fmod input plugin for an old obscure format using a library someone else did. The read callback in the plugin looks like this:

[code:3ofv0lfe]
FMOD_RESULT F_CALLBACK read(FMOD_CODEC_STATE codec, void *buffer, unsigned int size, unsigned int *read)
{
ahxplugin
ahx = (ahxplugin*)codec->plugindata;

hvl_DecodeFrame(ahx->ht, (int8)buffer, (int8)buffer+2, 4);
*read=size;

return FMOD_OK;
}
[/code:3ofv0lfe]
The hvl_DecodeFrame functions takes the soundfile, two buffers (left and right channel) and the last argument is for the soundformat (PCM16). However this doesn’t play at the correct speed, it plays as fast as Fmod can handle. Since there is no size or buffer length etc. to get/input from the function how can I play it at correct speed?

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.