audPlayMusic3D

Plays music in 3D space at a specific position and returns a channel handle. Takes music (music handle), x/y/z (3D position coordinates). Returns a channel handle.

Audio

Parameters & Returns

Parameters

music Int
x Double
y Double
z Double

Returns

Int

Quick Summary

Plays music in 3D space at a specific position and returns a channel handle. Takes music (music handle), x/y/z (3D position coordinates). Returns a channel handle.

Technical Exegesis...

Plays the specified music stream continuously in a loop at the given 3D position (x, y, z) and returns a channel handle. Returns 0 if the music handle is invalid or <= 0.

Music automatically loops forever until stopped. The position affects volume and panning based on the listener position. Unlike audPlayMusic, this returns a channel handle that can be used with standard channel functions. Use audSetListenerPosition to set where the listener is positioned.

Example

Example.bam
Local music:Int = audLoadMusic(music.ogg\")

Local channel:Int = audPlayMusic3D(music, sourceX, sourceY, sourceY)