Module convert

Module convert 

Source
Expand description

Zero-copy audio sample format conversion.

Provides utilities for converting between i16 PCM sample slices and raw byte slices using [bytemuck] (zero-copy reinterpret casts), and for wrapping owned byte vectors as shared [Bytes] handles for zero-copy fan-out.

Functionsยง

bytes_to_i16
Convert raw bytes to i16 PCM samples (zero-copy via bytemuck).
i16_to_bytes
Convert a slice of i16 PCM samples to raw bytes (zero-copy via bytemuck).
into_shared
Wrap raw bytes as a shared Bytes handle for zero-copy fan-out.