ExCubecl.AudioSamples (ExCubecl v0.4.0)

Copy Markdown View Source

An audio sample buffer residing on the GPU (f32 planar PCM).

Fields

  • handle — GPU buffer reference (Rustler ResourceArc)
  • channels — number of audio channels
  • sample_rate — samples per second (e.g. 48000)
  • frames — number of samples per channel
  • pts — presentation timestamp in microseconds

Summary

Functions

Creates an AudioSamples from a map returned by the NIF.

Types

t()

@type t() :: %ExCubecl.AudioSamples{
  channels: non_neg_integer(),
  frames: non_neg_integer(),
  handle: reference(),
  pts: non_neg_integer(),
  sample_rate: non_neg_integer()
}

Functions

from_map(map)

@spec from_map(map()) :: t()

Creates an AudioSamples from a map returned by the NIF.