Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualBeerNutts

Posted 14 March 2013 - 11:41 AM

Some audio API's support this by default using spatial clues.  For example, sfml provides a listener class which denotes where the "listener" is (basically, where a player is in the world, and where it's facing so surround sound will work as well).  And the sound class provides a method for setting the position of the sound when it is played.

 

These combined causes things that happen far away to either be not heard, or dimly heard automatically, as well as provides the correct orientation (so if the player is facing North, and a sound comes from the East, only the right side would play the sound).

 

FWIW, sfml's Audio class is built upon OpenAL, so I would suggest either using SFML or using openAL to provide these functions for you.

 

Good luck!


#1BeerNutts

Posted 14 March 2013 - 11:41 AM

Some audio API's support this by default using spatial clues.  For example, sfml provides a listener class which denotes where the "listener" is (basically, where a player is in the world, and where it's facing so surround sound will work as well).  And the sound class provides a method for setting the position of the sound when it is played.

 

These combined causes things that happen far away to either be not heard, or dimly heard automatically, as well as provides the correct orientation (so if the player is facing North, and a sound comes from the East, only the left side would play the sound).

 

FWIW, sfml's Audio class is built upon OpenAL, so I would suggest either using SFML or using openAL to provide these functions for you.

 

Good luck!


PARTNERS