0
0

i have a situation where one event is reporting 2 channels playing, while there should be only one. what would be the bast way to find out why this happens?

what i have is an event used for a character footsteps with a primary parameter with values from 0-10. this is basically an index which defines ground material type (sand, grass, concrete, etc…). so while our character is walking, we pull the material index from the collision under him and when the foot touches the ground we spawn an event and set the parameter value accordingly.

sounds under this event are distributed in following way:
default 0.0 – 1.0
concrete 1.0 – 2.0
etc..
to avoid any kind of overlapping we set the parameter value to X + 0.5. the event is one shot and all sound instances are also one shot.

our sound object wrapper creates an event on Play (also pulls out its parameters) and releases it on Stop. to avoid parameter jumping from default value to user defined, we use a pause flag which calls event->setPaused(1) before event->start(). after parameters are set, event->setPaused(0) is called to start event.

the problem is that it feels like the parameter is being "dragged" from one value to another, which would cause multiple sounds being played, but parameter velocity and seek speed are 0.0, so the parameter change must be instant.

any ideas on how to find out whats causing this?

  • You must to post comments
0
0

hm it is possibly triggering the subsounds because you started it, and it doesnt respect ‘paused’ as in it should ignore the subsounds.

You shouldnt use setpaused. Just getEvent, setParameter then start().
Let me know if that changes anything.

  • You must to post comments
0
0

yup, this solved the problem, tnx

would it be possible to make this work with setPaused state?

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.