M
Mike
Hi
how should I program a sdl_mixer fade in and out depending on the
value of X,Y,Z (3D matrix)?
Simply the more away from 0 those values are the more sound should be
faded out and vice versa.
Many thanks
Michael
-----
float X = XPLMGetDataf (pilotX);
float Y = XPLMGetDataf (pilotY);
float Z = XPLMGetDataf (pilotZ);
// fade out channel 0 to finish 3 seconds from now
Mix_FadeOutChannel(0, 3000);
//fade in 3000 miliseconds
Mix_FadeInChannel(0, sound, -1, 3000);
how should I program a sdl_mixer fade in and out depending on the
value of X,Y,Z (3D matrix)?
Simply the more away from 0 those values are the more sound should be
faded out and vice versa.
Many thanks
Michael
-----
float X = XPLMGetDataf (pilotX);
float Y = XPLMGetDataf (pilotY);
float Z = XPLMGetDataf (pilotZ);
// fade out channel 0 to finish 3 seconds from now
Mix_FadeOutChannel(0, 3000);
//fade in 3000 miliseconds
Mix_FadeInChannel(0, sound, -1, 3000);