Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Background music with OpenAL question

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

#1 Fredericvo   Members   -  Reputation: 420

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

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 );







PARTNERS