-
Notifications
You must be signed in to change notification settings - Fork 0
AudioStream
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.AudioStream |
| Namespace | Electron2D |
| Kind | class |
| Category | Audio |
Provides the base resource for audio data that can be played by audio nodes.
public abstract class Electron2D.AudioStream : Electron2D.ResourceProfile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: AudioStream
Base audio stream resource with length, monophonic, meta-stream and sample eligibility metadata queries.
AudioStream describes reusable sound or music data. Concrete stream
instances are created by the resource import pipeline and are consumed by
audio playback nodes such as Electron2D.AudioStreamPlayer and
Electron2D.AudioStreamPlayer2D.
Electron2D 0.1.0 Preview exposes stream metadata queries only. Device lifecycle, user bus routing and public stream playback handle objects are separate audio runtime tasks.
This type is not synchronized. Create and mutate stream resources on the main thread that owns the scene tree. Immutable metadata queries may be called from any thread by concrete implementations that document that behavior.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.AudioStreamPlayerElectron2D.AudioStreamPlayer2DElectron2D.Resource
| Member | Kind | Summary |
|---|---|---|
Electron2D.AudioStream() |
Constructor | Initializes a new instance of the Electron2D.AudioStream type. |
CanBeSampled() |
Method | Checks whether the stream can be converted into a static audio sample. |
GetLength() |
Method | Returns the stream length in seconds. |
IsMetaStream() |
Method | Checks whether this stream is a collection of other streams. |
IsMonophonic() |
Method | Checks whether this stream contains exactly one audio channel. |
Kind: Constructor
public Electron2D.AudioStream()Initializes a new instance of the Electron2D.AudioStream type.
The new stream has no playback state. Concrete implementations provide metadata through overridden query methods.
This constructor is not synchronized. Call it from the thread that owns the resource being created.
This constructor is available since Electron2D 0.1.0 Preview.
Electron2D.AudioStream
Kind: Method
public System.Boolean CanBeSampled()()Checks whether the stream can be converted into a static audio sample.
The base implementation returns false. Imported static streams
override this method and return true; imported streaming streams
keep returning false.
This preview method is a metadata query only. It does not decode audio data and does not allocate sample buffers.
true when the stream represents finite static data that can be
sampled in memory; otherwise, false.
This method is safe to call from any thread when the concrete stream is immutable.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.AudioStream.GetLength
Kind: Method
public System.Single GetLength()()Returns the stream length in seconds.
Imported WAV and OGG streams return the duration discovered during
import. Generated, microphone or indefinite future stream types should
return 0.
The stream length in seconds, or 0 when the stream length is not
finite or not known.
This method is safe to call from any thread when the concrete stream is immutable.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.AudioStream.CanBeSampled
Kind: Method
public System.Boolean IsMetaStream()()Checks whether this stream is a collection of other streams.
The base implementation returns false. Composite stream resources
may override this method in later audio runtime tasks.
true when the stream selects or combines child streams;
otherwise, false.
This method is safe to call from any thread when the concrete stream is immutable.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.AudioStream
Kind: Method
public System.Boolean IsMonophonic()()Checks whether this stream contains exactly one audio channel.
The base implementation returns false. Imported streams override
this method using the channel count discovered during import.
true when the stream is monophonic; otherwise, false.
This method is safe to call from any thread when the concrete stream is immutable.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.AudioStream.GetLength
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.