finally i managed to make openAL work and it's great.
I'm creating a 3D environment to display urban developments.
I want to play a wav file (steps) while the user is moving inside the environment and don't play it while is standing still.
that's the bit of code i wrote to achieve this outcome [obviously it doesn't work!!! :( ]:
float x[2],y[2];
float xmov,ymov;
for (int j=0;j>0;j++){
xmov=x[j+1]-x[j];
ymov=y[j+1]-y[j];
if(xmov=0,ymov=0) alSourcef(g_sources[2],AL_GAIN,0);
else alSourcef(g_sources[2],AL_GAIN,1);
}
do i need to add a sort of time counter to make j change every second (or half a second)?












