0
0

I have 1 sound playing and 1 listener set up to receive the sound.

When I move the channel’s position around, I get the sound’s volume decreasing as the channel pulls away which is correct I am assuming.

When I move the 3D Listener around away from the channel, I do not get any change in sound. Can someone please explain what I am doing wrong.

[code:1xv0f914]
FMOD::System* m_pSystem;
FMOD::Sound* m_pSound;
FMOD::Channel* m_pChannel;

FMOD::System_Create(&m_pSystem);    
m_pSystem->init(100, FMOD_INIT_NORMAL, 0);

m_pSystem->createSound( "D:/wave4.wav", FMOD_SOFTWARE | FMOD_3D, 0, &m_pSound );

FMOD_VECTOR _position;
FMOD_VECTOR _position2;
FMOD_VECTOR _velocity;
FMOD_VECTOR _velocity2;
FMOD_VECTOR _foward;
FMOD_VECTOR _up;

_position.x = 0;
_position.y = 0;
_position.z = 0;

_position2.x = 0;
_position2.y = 0;
_position2.z = 0;

_velocity.x = 0;
_velocity.y = 0;
_velocity.z = 0;

_velocity2.x = 0;
_velocity2.y = 0;
_velocity2.z = 0;

_foward.x = 0;
_foward.y = 0;
_foward.z = 0;

_up.x = 0;
_up.y = 0;
_up.z = 0;

while( bLoop == true )
{
    if( iLoopControl > 1000 )
    {
        bLoop = false;
    }
    _position2.x += (a value);
    m_pChannel->set3DAttributes( &_position2, &_velocity2 );
    m_pSystem->set3DListenerAttributes( 0, &_position, &_velocity, &_foward, &_up );

    m_pSystem->update();
}

[/code:1xv0f914]

  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.