0
0

Looking at FMOD examples I couldn’t find any related to FMOD::Event, are there any?
Here is my issue:
Using the FMOD designer I can see the following event:

Rat/Attack – which I can play from the designer.

In the text file created after building the project I have:

Name : /Sounds/Mobs/Rat/Attack
Index : /EVENTGROUP_ER_SOUNDS/EVENTGROUP_SOUNDS_MOBS/EVENTGROUP_SOUNDS_MOBS_RAT/EVENT_ER_SOUNDS_MOBS_RAT_ATTACK
Id : EVENTID_ER_SOUNDS_MOBS_RAT_ATTACK = 23
Notes :
Max. playbacks : 1
DSP Effects : none
Category : master/sounds

I try to play the following event:

RaiseOneshotEvent(“Project_NAME/Sounds/Mobs/Rat/Attack”);
where:

void SoundEventOwner::RaiseOneshotEvent(SoundEventOwner::EventDef eventd, const char* paramName, float param, const mmath::vector3* position, const mmath::vector3* velocity)
{
Event* e = eventd.GetEvent(this);
e->set3DAttributes(position, velocity, nullptr);
e->start();
}

class SoundEventOwner
{
public:
struct EventDef
{
EventDef(const char* name) :
GetEvent(boot::bind((FMOD::Event(SoundEventOwner::))&SoundEventOwner::GetFMODEvent, _1, name)){}
}

Unfortunately no sound comes from the speakers :( 😳 .

  • You must to post comments
0
0

The examples for the event system are in the designerapi folder in your fmod install directory.

It’s hard to diagnose your problem from the information you have provided.

[code:300glwya]“Project_NAME/Sounds/Mobs/Rat/Attack”[/code:300glwya]
Depending on what happens inside SoundEventOwner::GetFMODEvent this path might be wrong.

[code:300glwya]
e->set3DAttributes(position, velocity, nullptr);
e->start();
[/code:300glwya]
These are the only FMOD functions that I can see in your code. It is extremely important to check that the FMOD_RESULT being returned from these functions is FMOD_OK. If you’re getting an invalid handle error you might want to consult the person who wrote the SoundEventOwner class to get instructions on how to use it.

Hope this helps,

-Pete

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.