示例#1
0
float32 FMODSoundEvent::GetMaxDistance() const
{
    float32 distance = 0;
    FMOD::Event * fmodEventInfo = 0;
    SoundSystem::Instance()->fmodEventSystem->getEvent(eventName.c_str(), FMOD_EVENT_INFOONLY, &fmodEventInfo);
    if(fmodEventInfo)
    {
        fmodEventInfo->getPropertyByIndex(FMOD_EVENTPROPERTY_3D_MAXDISTANCE, &distance);
    }

    return distance;
}
示例#2
0
FMODSoundEvent::FMODSoundEvent(const FastName & _eventName) :
    is3D(false)
{
    DVASSERT(_eventName.c_str()[0] != '/');
    eventName = _eventName;

    FMOD::Event * fmodEventInfo = 0;
    SoundSystem::Instance()->fmodEventSystem->getEvent(eventName.c_str(), FMOD_EVENT_INFOONLY, &fmodEventInfo);
    if(fmodEventInfo)
    {
        FMOD_MODE mode = 0;
        fmodEventInfo->getPropertyByIndex(FMOD_EVENTPROPERTY_MODE, &mode);
        is3D = (mode == FMOD_3D);

        InitParamsMap();

        isDirectional = IsParameterExists(FMOD_SYSTEM_EVENTANGLE_PARAMETER);
    }
}