Realm

oa::audio::decode_file

Decode one supported file and upload planar FP32 samples. This includes WAV/PCM, FLAC, MP3, and supported AAC-LC or Vorbis container tracks. This is a synchronous CPU codec boundary followed by device upload. It does not introduce a decoder session or a hidden execution backend. Errors Returns an error for an empty path, file I/O failure, unsupported or malformed media, changing stream parameters, empty decoded audio, checked-size overflow, or device allocation/upload failure. This variant decodes on this thread’s default engine. An engine initialization failure is returned before decoding starts.

FnRust public API

Function Documentation

pub fn decode_file( path: impl AsRef<Path> ) -> Result<Audio>
Decode one supported file and upload planar FP32 samples. This includes WAV/PCM, FLAC, MP3, and supported AAC-LC or Vorbis container tracks. This is a synchronous CPU codec boundary followed by device upload. It does not introduce a decoder session or a hidden execution backend. Errors Returns an error for an empty path, file I/O failure, unsupported or malformed media, changing stream parameters, empty decoded audio, checked-size overflow, or device allocation/upload failure. This variant decodes on this thread’s default engine. An engine initialization failure is returned before decoding starts.

Examples