Please assume:
Minimum distance for 3D volume = 1.0;
Maximum distance for 3D volume = 100.0;
This is the declaration of the function:
An object can be a ball moving closer to the player.
void CalculateSoundVolume(Vec3 objectPosition,
Vec3 objectVelocity,
Vec3 userHead,
Vec3 userFoward,
float& leftEarVolume,
float& rightEarVolume)
{
}