Documentation
¶
Overview ¶
Package AudioStreamWAV provides methods for working with AudioStreamWAV object instances.
Index ¶
- type Advanced
- type Any
- type Format
- type Instance
- func (self Instance) AsAudioStream() AudioStream.Instance
- func (self Instance) AsAudioStreamWAV() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) AsResource() Resource.Instance
- func (self Instance) Data() []byte
- func (self Instance) Format() gdclass.AudioStreamWAVFormat
- func (self Instance) LoopBegin() int
- func (self Instance) LoopEnd() int
- func (self Instance) LoopMode() gdclass.AudioStreamWAVLoopMode
- func (self Instance) MixRate() int
- func (self Instance) SaveToWav(path string) error
- func (self Instance) SetData(value []byte)
- func (self Instance) SetFormat(value gdclass.AudioStreamWAVFormat)
- func (self Instance) SetLoopBegin(value int)
- func (self Instance) SetLoopEnd(value int)
- func (self Instance) SetLoopMode(value gdclass.AudioStreamWAVLoopMode)
- func (self Instance) SetMixRate(value int)
- func (self Instance) SetStereo(value bool)
- func (self Instance) Stereo() bool
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type LoopMode
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 Format ¶
type Format = gdclass.AudioStreamWAVFormat //gd:AudioStreamWAV.Format
const ( /*8-bit audio codec.*/ Format8Bits Format = 0 /*16-bit audio codec.*/ Format16Bits Format = 1 /*Audio is compressed using IMA ADPCM.*/ FormatImaAdpcm Format = 2 /*Audio is compressed as QOA ([url=https://qoaformat.org/]Quite OK Audio[/url]).*/ FormatQoa Format = 3 )
type Instance ¶
type Instance [1]gdclass.AudioStreamWAV
AudioStreamWAV stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped. This class can also be used to store dynamically-generated PCM audio data. See also [AudioStreamGenerator] for procedural audio generation.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsAudioStream ¶
func (self Instance) AsAudioStream() AudioStream.Instance
func (Instance) AsAudioStreamWAV ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) AsResource ¶
func (Instance) Format ¶
func (self Instance) Format() gdclass.AudioStreamWAVFormat
func (Instance) LoopMode ¶
func (self Instance) LoopMode() gdclass.AudioStreamWAVLoopMode
func (Instance) SaveToWav ¶
Saves the AudioStreamWAV as a WAV file to [param path]. Samples with IMA ADPCM or QOA formats can't be saved. [b]Note:[/b] A [code].wav[/code] extension is automatically appended to [param path] if it is missing.
func (Instance) SetFormat ¶
func (self Instance) SetFormat(value gdclass.AudioStreamWAVFormat)
func (Instance) SetLoopBegin ¶
func (Instance) SetLoopEnd ¶
func (Instance) SetLoopMode ¶
func (self Instance) SetLoopMode(value gdclass.AudioStreamWAVLoopMode)
func (Instance) SetMixRate ¶
func (*Instance) UnsafePointer ¶
type LoopMode ¶
type LoopMode = gdclass.AudioStreamWAVLoopMode //gd:AudioStreamWAV.LoopMode
const ( /*Audio does not loop.*/ LoopDisabled LoopMode = 0 /*Audio loops the data between [member loop_begin] and [member loop_end], playing forward only.*/ LoopForward LoopMode = 1 /*Audio loops the data between [member loop_begin] and [member loop_end], playing back and forth.*/ LoopPingpong LoopMode = 2 /*Audio loops the data between [member loop_begin] and [member loop_end], playing backward only.*/ LoopBackward LoopMode = 3 )