AudioStreamPlayer2D

package
v0.0.0-...-c909628 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package AudioStreamPlayer2D provides methods for working with AudioStreamPlayer2D object instances.

Index

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 Any

type Any interface {
	gd.IsClass
	AsAudioStreamPlayer2D() Instance
}

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 New

func New() Instance

func (Instance) AreaMask

func (self Instance) AreaMask() int

func (Instance) AsAudioStreamPlayer2D

func (self Instance) AsAudioStreamPlayer2D() Instance

func (Instance) AsCanvasItem

func (self Instance) AsCanvasItem() CanvasItem.Instance

func (Instance) AsNode

func (self Instance) AsNode() Node.Instance

func (Instance) AsNode2D

func (self Instance) AsNode2D() Node2D.Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) Attenuation

func (self Instance) Attenuation() Float.X

func (Instance) Autoplay

func (self Instance) Autoplay() bool

func (Instance) Bus

func (self Instance) Bus() string

func (Instance) GetPlaybackPosition

func (self Instance) GetPlaybackPosition() Float.X

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

func (self Instance) HasStreamPlayback() bool

Returns whether the [AudioStreamPlayer] can return the [AudioStreamPlayback] object or not.

func (Instance) MaxDistance

func (self Instance) MaxDistance() Float.X

func (Instance) MaxPolyphony

func (self Instance) MaxPolyphony() int

func (Instance) OnFinished

func (self Instance) OnFinished(cb func())

func (Instance) PanningStrength

func (self Instance) PanningStrength() Float.X

func (Instance) PitchScale

func (self Instance) PitchScale() Float.X

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) Playing

func (self Instance) Playing() bool

func (Instance) SeekTo

func (self Instance) SeekTo(to_position Float.X)

Sets the position from which audio will be played, in seconds.

func (Instance) SetAreaMask

func (self Instance) SetAreaMask(value int)

func (Instance) SetAttenuation

func (self Instance) SetAttenuation(value Float.X)

func (Instance) SetAutoplay

func (self Instance) SetAutoplay(value bool)

func (Instance) SetBus

func (self Instance) SetBus(value string)

func (Instance) SetMaxDistance

func (self Instance) SetMaxDistance(value Float.X)

func (Instance) SetMaxPolyphony

func (self Instance) SetMaxPolyphony(value int)

func (Instance) SetPanningStrength

func (self Instance) SetPanningStrength(value Float.X)

func (Instance) SetPitchScale

func (self Instance) SetPitchScale(value Float.X)

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 (self Instance) SetStreamPaused(value bool)

func (Instance) SetVolumeDb

func (self Instance) SetVolumeDb(value Float.X)

func (Instance) Stop

func (self Instance) Stop()

Stops the audio.

func (Instance) Stream

func (self Instance) Stream() [1]gdclass.AudioStream

func (Instance) StreamPaused

func (self Instance) StreamPaused() bool

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

func (Instance) VolumeDb

func (self Instance) VolumeDb() Float.X

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL