Documentation
¶
Index ¶
- Variables
- func IsAvailable() bool
- func ListenerOrient() (toward [3]float32)
- func ListenerPosition() (p [3]float32)
- func ListenerVelocity() (v [3]float32)
- func MasterGain() float32
- func SetListenerOrient(toward [3]float32)
- func SetListenerPosition(p [3]float32)
- func SetListenerVelocity(v [3]float32)
- func SetMasterGain(gain float32)
- func WaitIdle()
- type Player
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupportedFormat indicates the input format is not supported. ErrUnsupportedFormat = errors.New("audio: Unsupported format") )
Functions ¶
func ListenerOrient ¶
func ListenerOrient() (toward [3]float32)
ListenerOrient reports the orientation of listener, the toward vector
func ListenerPosition ¶
func ListenerPosition() (p [3]float32)
ListenerPosition reports the position of listener
func ListenerVelocity ¶
func ListenerVelocity() (v [3]float32)
ListenerVelocity reports the velocity of listener
func SetListenerOrient ¶
func SetListenerOrient(toward [3]float32)
SetListenerOrient set the orientation of listener, the toward vector
func SetListenerPosition ¶
func SetListenerPosition(p [3]float32)
SetListenerPosition set the position of listener
func SetListenerVelocity ¶
func SetListenerVelocity(v [3]float32)
SetListenerVelocity set the velocity of listener
Types ¶
type Player ¶
type Player interface { SetPosition([3]float32) SetVelocity([3]float32) SetDirection([3]float32) // SetOverlayGain set overlay gain of the source, normalized between 0 to 1 SetOverlayGain(float32) // IsRelative reports whether the player postion is relative to the listener. // relative postion is typically use for play BGM IsRelative() bool // SetRelative set/unset retative position SetRelative(b bool) // Play the sound, if sound implement io.ReadAt interface (i.e. MemSound), it can be played // in difference players at same time. otherwise (i.e. SoundFile) the io.Read interface will be used. // if the player is playing another sound, the new sound will put in pending state. Play(x wav.Reader, gain float32, loop int) error // Terminate current playing sound, apply fade out if not zero. the pending sound also be removed, // but call Play immediately after Terminate is legal. Terminate() // SetFadeOut set the fade out duration for terminate sound, it not apply to normal ending sound. // there is not "fade in" feature. SetFadeOut(msec uint) IsPlaying() bool // TODO: what? Release() }
Player is abstract audio player. to use it, place it into a 3D scene, select a song, then press the play button.
Click to show internal directories.
Click to hide internal directories.