public class AudioClip
Finite, interleaved Float32 PCM, independent of any audio device or AI engine. Samples are retained, not copied; modifying the supplied array modifies this clip. Sample values need not be in [-1, 1]; playback may clip, WAV saving does not.
clip = AudioClip.load(FilePath("speech.wav")); clip.play()
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | channelschannels as Int |
Samples per frame. |
| public readonly property | durationduration as Double |
Duration in seconds. |
| public readonly property | framesframes as ULong |
Number of complete frames, not interleaved scalar samples. |
| public readonly property | sampleRatesampleRate as Int |
Frames per second, in Hz. |
| public readonly property | samplessamples as Float[] |
Interleaved Float32 samples; no implicit channel mixing. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | AudioClip | Retains an interleaved PCM buffer without copying. |
| Modifier and Type | Member | Description |
|---|---|---|
| public static | load | Reads RIFF/RF64 WAVE PCM8/16/24/32 or IEEE Float32; does not play it. |
| public | playplay() as Void |
Plays on the OS default output (speakers, headphones or configured device). |
| public | savesave(notnull path as FilePath) as Void |
Saves lossless IEEE Float32 WAV; no resampling, clipping or normalization. |