Sponsored By

3D Audio

This is an exmaple of how to use XACT audio , for background and 3D spatial sound, using the framework.

Game Developer, Staff

November 27, 2011

1 Min Read
Game Developer logo in a gray background | Game Developer

3D AUDIO.

This example shows how to use audio imported from an XACT project, for background and 3D spatial sound effects and is quite a simple demonstration.

The shaders and effects is a bit irrelevant, and uses the same ligthing shader as the previous examples, so won’t be explained in this example, it is simply moving a crate in a large cirular motion, and as the ‘p’ key is pressed, a ‘punch’ sound is played at the position of the crate, and as the left and right arrows are pressed, the listener orientation is updated to match the camera, if the ‘q’ button is pressed, background music is initiated.

The header (alFrmTest.h) and main initialization file (alFrmTest.cpp) will not be explained in this demonstration as it has been in previous demonstrations, and have not changed.

There are no pictures for this demonstration, but there is a screenr (www.screenr.com) capture (with sound) for this demo.


Code Sample (_3DAudio): [https://github.com/alwynd/PublicGitRepo/zipball/master]


Screenr demo: [https://alwyndippenaar.viewscreencasts.com/df443b561f3b47da91aae5149577aa8a]

Read more about:

Blogs
Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like