cancel
Showing results for 
Search instead for 
Did you mean: 

FMOD, OSP Parameter Data Type

Carandiru
Honored Guest
"OCULUS SPATIALIZER Parameters:"
" 0: 3D Attributes (Data type: -2)"
" 1: Freq. Hint [None, Wide, Narrow] (None)"
" 2: Priority [0, 10] (5)"
" 3: Simple [On, Off] (Off)"
" 4: Attenuation [On, Off] (On)"
" 5: Range Max [1, 10000] (100.00)"

So I'm just wondering what is the 3D Attribute Data Type? I'm mirroring what FMOD does, with a vector for position, and a vector for velocity:

FMOD_VECTOR paramData[2] = { vPos, { 0.0f, 0.0f, 0.0f } };
result = m_dspOSP[iDx].m_OSP->setParameterData(0, &paramData, sizeof(FMOD_VECTOR) * 2);


Is this correct?
http://www.supersinfulsilicon.com/ supersinfulsilicon - software Home of the MaxVR Oculus Rift Video Player https://twitter.com/Carandiru
2 REPLIES 2

Petroza
Heroic Explorer
If you're using FMOD Studio the parameter will be updated automatically. If you're controlling the DSP directly using the Low Level API you need to create a FMOD_DSP_PARAMETER_3DATTRIBUTES struct.

Here is an example:
FMOD_DSP_PARAMETER_3DATTRIBUTES attributes = {0};
attributes.relative.position.x = 0.0f;
attributes.relative.position.y = 0.0f;
attributes.relative.position.z = 1.0f;
ERRCHECK(dsp->setParameterData(0, &attributes, sizeof(attributes)));

Carandiru
Honored Guest
Thanks for clearing that up Peter, and for all your help before with my other thread of questions.

I almost 😉 have everything for the OSP working in FMOD for MaxVR now!
http://www.supersinfulsilicon.com/ supersinfulsilicon - software Home of the MaxVR Oculus Rift Video Player https://twitter.com/Carandiru