Jump to content

  • Log In with Google      Sign In   
  • Create Account

Background music with OpenAL question

  • You cannot reply to this topic
1 reply to this topic

#1 Fredericvo   Members   -  Reputation: 377

Like
0Likes
Like

Posted 27 August 2014 - 09:50 AM

Not sure if this is the right section but I don't see an Audio programming one.

I have a simple, perhaps a bit naive question about openal. As it is an API meant for directional sounds it is perfect for a 3D scene but my question is how do I set up a background music as a source? Are there general conventions? I assume the source must follow the listener, much like a skybox follows the camera in graphics, but should I set source equal to listener or a bit in front/behind for the sound to become regular stereo if the original wave was like so?

 



Sponsor:

#2 lunkhound   Members   -  Reputation: 624

Like
0Likes
Like

Posted 09 October 2014 - 09:10 PM

Try this:

 

alSourcei( mSource, AL_SOURCE_RELATIVE, AL_TRUE );

alSourcef( mSource, AL_ROLLOFF_FACTOR, 0.0 );







PARTNERS