Audio 3D
App: apps/audio_3d/
Demonstrates 3D audio: a listener you move with A/D and a sound source that moves on a sine path. Space plays the sound at the source’s current position.
Run from root
Section titled “Run from root”% ./plume3d audio_3dor
Run from app directory
Section titled “Run from app directory”% ./../plume3d .What it does
Section titled “What it does”- Listener position is updated from keyboard: A left, D right (
Audio.setPosition,Audio.setOrientation). - One source moves along X with
Math.sin(_time); another (music) can be played with M. - Space — play the click at the moving source position.
- GUI shows listener X and control hints.
- Audio —
newSource,play,stop,setPosition,setOrientation. - Source —
setPosition,setLooping. - Input —
key,keyJustPressed. - Math —
sin.
Assets
Section titled “Assets”Same as Audio Basic: sounds/click.wav, sounds/music.wav.