I have a basic multi track event with a multi channel effect applied to it. I’ve integrated the project into my Visual Studios project and everything works fine. I can play, stop, etc. with no problems. The issue I’m having is when I attempt to change the value of the one primary parameter. I can update the parameter using setValue() and then do a getValue and the update is reflected. The problem is that the actual sound does not change according to the updated parameter. The Audio plays from the beginning and never alters.
For debugging reference, I’ve integrated the "car" tutorial FMOD project, and using all the same code I am currently using, I am able to change the car RPM sound using setValue().
The code I’m using is pretty standard:
ERRCHECK(result = FMOD::EventSystem_Create(&eventsystem));
ERRCHECK(result = eventsystem->getSystemObject(&system));
system->setSoftwareFormat(48000, FMOD_SOUND_FORMAT_PCM16, 10, 10,FMOD_DSP_RESAMPLER_LINEAR);
ERRCHECK(result = eventsystem->init(64, FMOD_INIT_NORMAL, 0, FMOD_EVENT_INIT_NORMAL));
ERRCHECK(result = eventsystem->setMediaPath((char *)MEDIA_PATH));
ERRCHECK(result = eventsystem->load("FMod Files/Brain-Music.fev", 0, 0));
ERRCHECK(result = eventsystem->getGroup("Brain-Music/Music", FMOD_EVENT_DEFAULT, &eventgroup));
ERRCHECK(result = eventgroup->getEvent("event00", FMOD_EVENT_DEFAULT, &event));
ERRCHECK(result = event->getParameter("param00", ¶m));
ERRCHECK(result = param->getRange(&range_min, &range_max));
ERRCHECK(result = param->setValue(5));
ERRCHECK(result = event->start());
I also have an event update running in my loop.
It seems to be an issue with the FMOD project it’s self? I’ve attached a SS of the design project for reference.
- cmorgan8506 asked 4 years ago
Actually figured this out finally.
I guess 10 input channels was sufficient to get it running, but it took 12 for the changes to actually take place.
I did the following:
system->setSoftwareFormat(48000, FMOD_SOUND_FORMAT_PCM16, 0, 10,FMOD_DSP_RESAMPLER_LINEAR);
system->setSoftwareFormat(48000, FMOD_SOUND_FORMAT_PCM16, 0, 12,FMOD_DSP_RESAMPLER_LINEAR);
It now works!
- cmorgan8506 answered 4 years ago
Ah yes, and 0 for numoutputchannels is the right value rather than >0, as that would set it into RAW speakermode which provides unexpected results sometimes.
Edit: did your wav source have 12 channels? FMOD wouldnt need to be set to 12 to play a 10 ch wav.
Please login first to submit.