0
0

Hi

It seems fmod create sound API doesn’t work in windows phone 8 simulator and device (Lumia 920). the following is the code.
The app will be freeze in the mFmodSystem->createSound(). The same code works in Win8 Metro app. Is there any special call sequence for win phone 8?

Thanks.

====== init Fmod system===========
result = FMOD::System_Create(&mFmodSystem);
if(result != FMOD_OK)
{
mFmodSystem = NULL;
return;
}
result = mFmodSystem->init(16, FMOD_INIT_NORMAL , NULL);
if(result != FMOD_OK) {
if (mFmodSystem)
{
mFmodSystem->release();
mFmodSystem = NULL;
}
}

=====create sound from a mp3 file ==================
int result = 0;
FMOD_CREATESOUNDEXINFO soundExInfoMp3;
memset(&soundExInfoMp3, 0, sizeof(FMOD_CREATESOUNDEXINFO));
soundExInfoMp3.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);

result = mFmodSystem->createSound(soundFile , FMOD_SOFTWARE , &soundExInfoMp3, &soundHandle);

===== create sound from mp3 buffer ==================
int result = 0;
FMOD_CREATESOUNDEXINFO soundExInfoMp3;
memset(&soundExInfoMp3, 0, sizeof(FMOD_CREATESOUNDEXINFO));
soundExInfoMp3.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);

result = mFmodSystem->createSound(mp3Data, FMOD_SOFTWARE | FMOD_OPENMEMORY, &soundExInfoMp3, &soundHandle);
  • You must to post comments
0
0

try to enlarge the DSP buffer size and the log as below:

FMOD: Thread::initThread : Initializing FMOD mixer thread. priority 2
FMOD: Thread::initThread : – Stacksize 0. Stack pointer 00000000 : usesemaphore = 1 : sleeptime = 0
FMOD: Thread::initThread : done.
FMOD: SystemI::init : Set up emulated output
FMOD: SystemI::init : create the channel pool
FMOD: SystemI::init : Set up streamer
FMOD: Thread::initThread : Initializing FMOD stream thread. priority 2
FMOD: Thread::initThread : – Stacksize 49152. Stack pointer 00000000 : usesemaphore = 0 : sleeptime = 10
FMOD: Thread::initThread : done.
FMOD: SystemI::init : done

FMOD: OutputWASAPI::feederUpdate : Starvation detected in WASAPI output buffer!
FMOD: SystemI::createSoundInternal : filename = C:\Data\Programs{E0ED3292-F3AB-4D5F-B42C-396BD19004DE}\Install\Assets\wave.mp3 : mode 00000040
FMOD: SystemI::createSoundInternal : exinfo->cbsize = 136
FMOD: OutputWASAPI::feederUpdate : Starvation detected in WASAPI output buffer!

  • You must to post comments
0
0

Calling createSound from the UI thread of your application will result in a deadlock with the current version.

This will be fixed in version 4.44.05 which we hope to release soon.

In the meantime you can move the createSound call to a different thread, or set the FMOD_NONBLOCKING flag in the mode argument.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.