0
0

The UnzipItem, unzips to buff3 a PCM chunk, but I get only 3 callback calls and it plays no sound.

[code:3h4vyql7]
FMOD::Channel *channel = 0;
FMOD_CREATESOUNDEXINFO createsoundexinfo;
memset(&createsoundexinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO));
createsoundexinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
createsoundexinfo.length = 584762; //Size of the .WAV
createsoundexinfo.decodebuffersize = 11025;
createsoundexinfo.numchannels = 1;
createsoundexinfo.defaultfrequency = 11025;
createsoundexinfo.format =FMOD_SOUND_FORMAT_PCM16; createsoundexinfo.pcmreadcallback = pcmreadcallback;
createsoundexinfo.pcmsetposcallback = 0;

result = system->createSound(0, FMOD_OPENUSER | FMOD_CREATESTREAM, &createsoundexinfo, &sound);

printf("\nAttempting to play the sound now. Press any key to exit...");
result = system->playSound(FMOD_CHANNEL_FREE, sound, 0, &channel);
[/code:3h4vyql7]

[code:3h4vyql7]
FMOD_RESULT F_CALLBACK pcmreadcallback(FMOD_SOUND *sound, void *data, unsigned int datalen)
{

printf("\nThis is the callback function");


char* buff3 = (char *)data;


UnzipItem(hz, a, buff3, MY_BUFFER_SIZE);


    return FMOD_OK;

}
[/code:3h4vyql7]

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.