oa::audio::decode_file

Decode one WAV/PCM, FLAC, or MP3 file and upload planar FP32 samples. 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.

FnRust public API

Function Documentation

pub fn decode_file( engine: &Engine, path: impl AsRef<Path> ) -> Result<Audio>
Decode one WAV/PCM, FLAC, or MP3 file and upload planar FP32 samples. 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.

Examples