AudioStreamWAV

package
v0.0.0-...-5fa07e4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package AudioStreamWAV provides methods for working with AudioStreamWAV 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
	AsAudioStreamWAV() Instance
}

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 New

func New() Instance

func (Instance) AsAudioStream

func (self Instance) AsAudioStream() AudioStream.Instance

func (Instance) AsAudioStreamWAV

func (self Instance) AsAudioStreamWAV() Instance

func (Instance) AsObject

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

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) Data

func (self Instance) Data() []byte

func (Instance) Format

func (self Instance) Format() gdclass.AudioStreamWAVFormat

func (Instance) LoopBegin

func (self Instance) LoopBegin() int

func (Instance) LoopEnd

func (self Instance) LoopEnd() int

func (Instance) LoopMode

func (self Instance) LoopMode() gdclass.AudioStreamWAVLoopMode

func (Instance) MixRate

func (self Instance) MixRate() int

func (Instance) SaveToWav

func (self Instance) SaveToWav(path string) error

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

func (self Instance) SetData(value []byte)

func (Instance) SetFormat

func (self Instance) SetFormat(value gdclass.AudioStreamWAVFormat)

func (Instance) SetLoopBegin

func (self Instance) SetLoopBegin(value int)

func (Instance) SetLoopEnd

func (self Instance) SetLoopEnd(value int)

func (Instance) SetLoopMode

func (self Instance) SetLoopMode(value gdclass.AudioStreamWAVLoopMode)

func (Instance) SetMixRate

func (self Instance) SetMixRate(value int)

func (Instance) SetStereo

func (self Instance) SetStereo(value bool)

func (Instance) Stereo

func (self Instance) Stereo() bool

func (*Instance) UnsafePointer

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

func (Instance) Virtual

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

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
)

Jump to

Keyboard shortcuts

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