CNA Samples

Audio 3D

Ported from Microsoft's XNA 4.0 Audio 3D sample.

Source for this sample on GitHub ↗

An orange cat and a black dog above a checkerboard ground under a blue sky. Play ▸

Opens in a new tab. Click the game to enable audio in your browser.

About this sample

A cat circles the scene and plays one of three short sounds; a stationary dog alternates a looping bark with a pause. The audio manager tracks each sound's emitter and the camera's listener to demonstrate distance, stereo position and Doppler pitch.

Controls

ActionControl
Turn the listenerLeft/Right arrow keys or gamepad left stick
Move the listenerUp/Down arrow keys or gamepad left stick
ExitEscape or gamepad Back