AudioClip

class in InfEngine.core

Description

Pythonic wrapper around C++ AudioClip.

description

Constructors

Signature Description
AudioClip.__init__(native: CppAudioClip) → None Wrap an existing C++ AudioClip.

constructors

Properties

Name Type Description
native CppAudioClip The underlying C++ AudioClip object. (read-only)
is_loaded bool Whether the audio data is loaded in memory. (read-only)
duration float Duration of the audio clip in seconds. (read-only)
sample_count int Total number of audio samples. (read-only)
sample_rate int Sample rate in Hz (e.g. (read-only)
channels int Number of audio channels (1=mono, 2=stereo). (read-only)
name str The display name of the audio clip. (read-only)
file_path str The file path the clip was loaded from. (read-only)

properties

Public Methods

Method Description
unload() → None Unload the audio data from memory.

public_methods

Static Methods

Method Description
static AudioClip.load(file_path: str) → Optional[AudioClip] Load an audio clip from a file path (WAV, OGG, MP3).
static AudioClip.from_native(native: CppAudioClip) → AudioClip Wrap an existing C++ AudioClip instance.

static_methods

Operators

Method Returns
__repr__() → str str

operators

Example

# TODO: Add example for AudioClip

example

See Also

see_also