0
0

Hi, I’m loading ‘examples.fev’ (from fmod package) into my app and modifying param ‘(distance)’ for event ‘examples/AdvancedTechniques/SimulatingDistance’, but nothing happens.

The same problem with ‘examples/FeatureDemonstration/3D Events/Occlusion’ and other 3D events.

But 2D events like ‘examples/AdvancedTechniques/Car’ work fine.

[code:3r4e7buh]
Log(_T("FMOD starting..\n"));
FmodGuard(FMOD::EventSystem_Create(&EventSystem));
FmodGuard(FMOD::NetEventSystem_Init(EventSystem));

FMOD::System* system;
FmodGuard(EventSystem->getSystemObject(&system));

unsigned int version;
FmodGuard(system->getVersion(&version));
Logf(_T("FMOD version: %X\n"), version);

if (version < FMOD_VERSION)
    throw FmodException("You are using an old version of FMOD!");

int numdrivers;
FmodGuard(system->getNumDrivers(&numdrivers));
if (numdrivers == 0)
{
    FmodGuard(system->setOutput(FMOD_OUTPUTTYPE_NOSOUND));
}
else
{
    FMOD_CAPS caps;
    FMOD_SPEAKERMODE speakermode;
    FmodGuard(system->getDriverCaps(0, &caps, 0, 0, &speakermode));
    FmodGuard(system->setSpeakerMode(speakermode));
    if (caps & FMOD_CAPS_HARDWARE_EMULATED)
    {
        /*
        The user has the 'Acceleration' slider set to off! This is really bad
        for latency! You might want to warn the user about this.
        */
        FmodGuard(system->setDSPBufferSize(1024, 10));
    }

    char name[1024];
    FmodGuard(system->getDriverInfo(0, name, sizeof(name), 0));
    if (strstr(name, "SigmaTel"))
    {
        /*
        Sigmatel sound devices crackle for some reason if the format is PCM 16bit.
        PCM floating point output seems to solve it.
        */
        FmodGuard(system->setSoftwareFormat(48000, FMOD_SOUND_FORMAT_PCMFLOAT, 0, 0, FMOD_DSP_RESAMPLER_LINEAR));
    }
}

LogDeviceInfo();

const int maxchannels = 128;

const FMOD_INITFLAGS initflags = 
    FMOD_INIT_NORMAL |
    FMOD_INIT_SOFTWARE_OCCLUSION;

FMOD_RESULT result = EventSystem->init(maxchannels, initflags, 0, FMOD_EVENT_INIT_NORMAL);
if (result == FMOD_ERR_OUTPUT_CREATEBUFFER)
{
    Logf(_T("WARNING: selected speaker mode not supported, switching to stereo\n"));
    FmodGuard(system->setSpeakerMode(FMOD_SPEAKERMODE_STEREO));
    result = EventSystem->init(maxchannels, initflags, 0, FMOD_EVENT_INIT_NORMAL);
}
FmodGuard(result);

[/code:3r4e7buh]

[code:3r4e7buh]
[2010-12-20 16:14:56] FMOD starting..
[2010-12-20 16:14:56] FMOD version: 43205
[2010-12-20 16:14:56] Device driver info: ‘Динамики (Устройство с поддержкой High Definition Audio)’
[2010-12-20 16:14:56] Device output type: Win32 – Windows Audio Session API. (Default on Windows Vista/Windows 7)
[2010-12-20 16:14:56] Device software format: 16bit integer PCM data.
[2010-12-20 16:14:56] Device output channels: 2
[2010-12-20 16:14:56] Device maximum channel depth: 6
[2010-12-20 16:14:56] Device bits per sample: 16
[2010-12-20 16:14:56] Device speaker mode: The speakers are stereo (DEFAULT).
[2010-12-20 16:14:56] Device can output to 8bit integer PCM.
[2010-12-20 16:14:56] Device can output to 16bit integer PCM.
[2010-12-20 16:14:56] Device can output to 24bit integer PCM.
[2010-12-20 16:14:56] Device can output to 32bit integer PCM.
[2010-12-20 16:14:56] Device can output to 32bit floating point PCM.
[2010-12-20 16:14:56] Device minimum frequency: 44100
[2010-12-20 16:14:56] Device maximum frequency: 44100
[2010-12-20 16:14:56] Device mixer output rate: 48000
[2010-12-20 16:14:56] Device software channels: 32
[/code:3r4e7buh]

Windows 7 x64

Any thoughts how to fix it?

  • You must to post comments
0
0

Parameters such as "(distance)" are automatically updated by the system. You should not be modifying them yourself. If you want to tweak the (distance) parameter, set the position of the Event relative to the listener, and it will update automatically.

If you want to tweak it by hand to simulate distance, then create a new parameter (or, I suppose, rename the existing one) to ‘distance’ (as opposed to ‘(distance)’), and then you should be able to update it by hand.

Hope that helps!

  • You must to post comments
0
0

Thanks very very much! Now it works.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.