Documentation
¶
Overview ¶
Package AudioStreamPlayer2D provides methods for working with AudioStreamPlayer2D object instances.
Index ¶
- type Advanced
- type Any
- type Instance
- func (self Instance) AreaMask() int
- func (self Instance) AsAudioStreamPlayer2D() Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsNode2D() Node2D.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) Attenuation() Float.X
- func (self Instance) Autoplay() bool
- func (self Instance) Bus() string
- func (self Instance) GetPlaybackPosition() Float.X
- func (self Instance) GetStreamPlayback() [1]gdclass.AudioStreamPlayback
- func (self Instance) HasStreamPlayback() bool
- func (self Instance) MaxDistance() Float.X
- func (self Instance) MaxPolyphony() int
- func (self Instance) OnFinished(cb func())
- func (self Instance) PanningStrength() Float.X
- func (self Instance) PitchScale() Float.X
- func (self Instance) Play()
- func (self Instance) PlaybackType() gdclass.AudioServerPlaybackType
- func (self Instance) Playing() bool
- func (self Instance) SeekTo(to_position Float.X)
- func (self Instance) SetAreaMask(value int)
- func (self Instance) SetAttenuation(value Float.X)
- func (self Instance) SetAutoplay(value bool)
- func (self Instance) SetBus(value string)
- func (self Instance) SetMaxDistance(value Float.X)
- func (self Instance) SetMaxPolyphony(value int)
- func (self Instance) SetPanningStrength(value Float.X)
- func (self Instance) SetPitchScale(value Float.X)
- func (self Instance) SetPlaybackType(value gdclass.AudioServerPlaybackType)
- func (self Instance) SetStream(value [1]gdclass.AudioStream)
- func (self Instance) SetStreamPaused(value bool)
- func (self Instance) SetVolumeDb(value Float.X)
- func (self Instance) Stop()
- func (self Instance) Stream() [1]gdclass.AudioStream
- func (self Instance) StreamPaused() bool
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- func (self Instance) VolumeDb() Float.X
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Instance ¶
type Instance [1]gdclass.AudioStreamPlayer2D
Plays audio that is attenuated with distance to the listener. By default, audio is heard from the screen center. This can be changed by adding an [AudioListener2D] node to the scene and enabling it by calling [method AudioListener2D.make_current] on it. See also [AudioStreamPlayer] to play a sound non-positionally. [b]Note:[/b] Hiding an [AudioStreamPlayer2D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer2D]'s audio output, set [member volume_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing).
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsAudioStreamPlayer2D ¶
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) Attenuation ¶
func (Instance) GetPlaybackPosition ¶
Returns the position in the [AudioStream].
func (Instance) GetStreamPlayback ¶
func (self Instance) GetStreamPlayback() [1]gdclass.AudioStreamPlayback
Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D].
func (Instance) HasStreamPlayback ¶
Returns whether the [AudioStreamPlayer] can return the [AudioStreamPlayback] object or not.
func (Instance) MaxDistance ¶
func (Instance) MaxPolyphony ¶
func (Instance) OnFinished ¶
func (self Instance) OnFinished(cb func())
func (Instance) PanningStrength ¶
func (Instance) PitchScale ¶
func (Instance) Play ¶
func (self Instance) Play()
Queues the audio to play on the next physics frame, from the given position [param from_position], in seconds.
func (Instance) PlaybackType ¶
func (self Instance) PlaybackType() gdclass.AudioServerPlaybackType
func (Instance) SetAreaMask ¶
func (Instance) SetAttenuation ¶
func (Instance) SetAutoplay ¶
func (Instance) SetMaxDistance ¶
func (Instance) SetMaxPolyphony ¶
func (Instance) SetPanningStrength ¶
func (Instance) SetPitchScale ¶
func (Instance) SetPlaybackType ¶
func (self Instance) SetPlaybackType(value gdclass.AudioServerPlaybackType)
func (Instance) SetStream ¶
func (self Instance) SetStream(value [1]gdclass.AudioStream)
func (Instance) SetStreamPaused ¶
func (Instance) SetVolumeDb ¶
func (Instance) Stream ¶
func (self Instance) Stream() [1]gdclass.AudioStream