0
0

Hi,

We are looking at FMod Ex to replace supercollider in some virtual reality platforms we are rolling out. Right now the objective is to output to 16 channels via a Fireface 800 mixer.

We can output to 8 with no problem. I can also output to between 8-16, as per the docs. However when I output to a speaker where the speaker number is > 7 (i.e. speakers 8-15), the system will crash on
system->close()

"Windows has triggered a breakpoint in test.exe
This may be due to a corruption of the heap, and indicates a bug in test.exe or any of the DLLs it has loaded"

The relevent code:

Setup the system:

[code:cf9sfzr5]
FMOD::System_Create(&system);
system->setOutput(FMOD_OUTPUTTYPE_ASIO);
system->setSoftwareFormat(48000, FMOD_SOUND_FORMAT_PCM16, 16, 16, FMOD_DSP_RESAMPLER_LINEAR);
// The below line should be set implicitly anyway
system->setSpeakerMode(FMOD_SPEAKERMODE_RAW);
system->init(32, FMOD_INIT_NORMAL, 0);

// Load a sound
result = system->createSound("../media/drumloop.wav", FMOD_SOFTWARE, 0, &sound1);
system->playSound(FMOD_CHANNEL_FREE, sound1, false, &channel);
[/code:cf9sfzr5]

The problem causing part (changing SPEAKER_NUMBER below):
[code:cf9sfzr5]
// Set the speaker level
float speakerLevel = 1.0
int SPEAKER_NUMBER = 2;
channel->setSpeakerLevels((FMOD_SPEAKER)SPEAKER_NUMBER ,&speakerLevel,1);[/code:cf9sfzr5]

Main loop:
[code:cf9sfzr5]
do{

    if (kbhit())
    {
        key = getch();
    }

    system->update();
    Sleep(10);

}while(key!=27);

[/code:cf9sfzr5]
Now shutting down the system:

[code:cf9sfzr5]channel->stop();
sound1->release();
system->close();
system->release();
[/code:cf9sfzr5]

The above example works fine, for 0 <= SPEAKER_NUMBER <= 7
However as soon as I have 8 <= SPEAKER_NUMBER <= 15, the sound will play out of the correct channels correctly, but visual studio will catch the above error during system->close()

So close yet so far, as in things seem to be functional, however there may be some memory being misallocated at some point under the hood?

  • You must to post comments
0
0

Hi you didnt mention which version you are using.

I tried the same code you posted above and got no errors, and i also ran it through purify in case it wasnt crashing but still was doing some overwrites somewhere, and it didnt complain either.

It could be related to fixes we made a while back to do with the pan matrix sizes, i’d recommend trying the latest version first.

  • You must to post comments
0
0

Hi Brett,

I was using version 00040613

I’ll upgrade to 4.06.15 and give it another go. Although in the change log I can’t see anything which may be immediately relevant to the matrix panning since 4.04.18 or so.

I’ll also try it on a different development machine, and report back with the new results.

Thanks

  • You must to post comments
0
0

i am using Version: 4.28.06 (win32) and i am unable to play through all channels.

when i set AsioNumChannels > 8 , i get the output on analog channel 1 to appear also on 9,11,13 etc…

Also, the recording application in the vs_2005 examples is unable to select a proper Recording Driver, the index shows a different sound card instead of available analog inputs for recording available in the Fireface soundcard.

therefore calling system.getRecordDriverInfo on the selected driver cant work.

any clue ?

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.