0
0

Hi there.
We are still working with our tank simulator and we have just uppgraded from fmod 3.5 to 3.7. After this upgrade we have encountered some problems. Here is our test code:

Initialising

FSOUND_SetOutput(FSOUND_OUTPUT_DSOUND))

FSOUND_SetSpeakerMode(FSOUND_SPEAKERMODE_SURROUND);

FSOUND_Init(44100, 0, FSOUND_INIT_GLOBALFOCUS))

FSOUND_SetSFXMasterVolume(255);

Gameloop

// Start point for both Listener and Sound
kSoundPoint pos;
kSoundVector vel, forward, up;
pos.SetXYZ(0.0, 0.0, 0.0);
vel.SetXYZ(0.0, 0.0, 0.0);
forward.SetXYZ(1.0, 0.0, 0.0);
up = forward;

FSOUND_3D_Listener_SetAttributes(&pos, &vel,fForward[0], fForward[1], fForward[2], fUp[0], fUp[1], fUp[2]);

FSOUND_Update();

pSample = FSOUND_Sample_Load(FSOUND_FREE, strFileName.c_str(),
FSOUND_16BITS | FSOUND_LOOP_NORMAL | FSOUND_FORCEMONO | FSOUND_HW3D, 0,0);

FSOUND_Sample_SetDefaults(sample, -1, nVolume, -1, nPriority)

nChannel = FSOUND_PlaySound(FSOUND_FREE, (FSOUND_SAMPLE *)pSample);

FSOUND_Update();

FSOUND_3D_SetAttributes(nChannel, Pos, Vel)

FSOUND_Update();

::Sleep(2000);

//Setting a new position for the listener
pos.SetXYZ(2000.0, 0.0, 0.0);

FSOUND_3D_Listener_SetAttributes(&pos, &vel,fForward[0], fForward[1], fForward[2], fUp[0], fUp[1], fUp[2]);

FSOUND_Update();

::Sleep(2000);

//Setting the same position for the sound
FSOUND_3D_SetAttributes(nChannel, Pos, Vel)

FSOUND_Update();

::Sleep(1000);

When we run it with fmod 3.5, we can hear the sound until we move the listeners position. The sound reappear when we move it to the listeners position.

When we run it with fmod 3.7 something else happens. It dosen’t seem like the listeners position is moved. We can still hear the sound after listeners position has moved but it disappears when the sound is moved. Is there a different way to do this in fmod 3.7 than in 3.5


Svein-Aage Opsal

Kongsberg Defence & Aerospace

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.