Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Background music with OpenAL question


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

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

#1 Fredericvo   Members   -  Reputation: 659

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: 761

Like
1Likes
Like

Posted 09 October 2014 - 09:10 PM

Try this:

 

alSourcei( mSource, AL_SOURCE_RELATIVE, AL_TRUE );

alSourcef( mSource, AL_ROLLOFF_FACTOR, 0.0 );






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS