0
0

Is there a way to accomplish Event::setPan() as easily as Event::setPitch() and Event::setVolume()?

My compiler shows a setProperty when I type pEvent-> and get a list, but it’s not in the docs. Can I pEvent->setProperty("2D Spealer L", float); where float is 0 to -60?

Thanks.

  • You must to post comments
0
0

Ok, without the docs (am I just missing them somewhere?) and a little experimentation, I discovered the following.

float leftVol = 1.0;
pEvent->setPropertyByIndex(FMOD_EVENTPROPERTY_SPEAKER_L, &leftVol);
float rightVol = 1.0 – leftVol;
pEvent->setPropertyByIndex(FMOD_EVENTPROPERTY_SPEAKER_R, &rightVol);

(BTW – these enums don’t match the docs.)

seems to work so I can control left and right volumes seperately. THe units do not match the values set in designer, which are 0 (full volume) to -60 (lowest volume).

This however sets the pan for ALL INSTANCES OF AN EVENT! I determined this is already happening with setVolume and setPitch, although I didn’t notice it until my setPan() code above made it fairly obvious.

So, 2 questions. Where are the docs for the setProperty() functions, and is it possible to set each event instance’s properties individually?

Thanks.

  • You must to post comments
0
0

Hi,

[quote="QuantumAnenome":381mhc5s]Ok, without the docs (am I just missing them somewhere?) and a little experimentation, I discovered the following.

float leftVol = 1.0;
pEvent->setPropertyByIndex(FMOD_EVENTPROPERTY_SPEAKER_L, &leftVol);
float rightVol = 1.0 – leftVol;
pEvent->setPropertyByIndex(FMOD_EVENTPROPERTY_SPEAKER_R, &rightVol);

(BTW – these enums don’t match the docs.)
[/quote:381mhc5s]

What docs are you looking at? Are you looking at the documentation that came with the FMOD Programmer’s API? On windows it can be found in the start menu at "Programs->FMOD SoundSystem->FMOD Programmers API Win32->FMOD Programmers API documentation".

[quote="QuantumAnenome":381mhc5s]So, 2 questions. Where are the docs for the setProperty() functions,[/quote:381mhc5s]

Search the FMOD Programmer’s API documentation for setPropertyByIndex and FMOD_EVENT_PROPERTY.

[quote="QuantumAnenome":381mhc5s]and is it possible to set each event instance’s properties individually?[/quote:381mhc5s]

Yes. Look at the this_instance parameter in the setPropertyByIndex documentation.

Thanks,
Ben

  • You must to post comments
0
0

[quote="ben":1rt8w1df][quote="QuantumAnenome":1rt8w1df]So, 2 questions. Where are the docs for the setProperty() functions,[/quote:1rt8w1df]

Search the FMOD Programmer’s API documentation for setPropertyByIndex and FMOD_EVENT_PROPERTY.
[/quote:1rt8w1df]

I noticed that there is a typo in the FMOD_EVENT_PROPERTY documentation: All the FMOD_EVENTPROPERTY_SPEAKER_* values are described as being the front left speaker volume. This has been fixed for our impending release.

Ben

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.