Class AsioNativeToFloatConverter
Converts a single channel of native ASIO samples into a Span<T> of normalized floats in [-1.0, +1.0].
Supported native formats are Int16LSB, Int24LSB, Int32LSB, and Float32LSB — the four
formats used by the vast majority of ASIO drivers. Other formats throw NotSupportedException.
public static class AsioNativeToFloatConverter
- Inheritance
-
AsioNativeToFloatConverter
- Inherited Members
Remarks
This is exposed publicly so callers using the raw-buffer escape hatch on AsioDevice
(RawInput/RawOutput) can convert bytes to float without re-implementing the per-format math.
Methods
BytesPerSample(AsioSampleType)
Bytes per sample for the given native format. Throws for unsupported formats.
public static int BytesPerSample(AsioSampleType nativeFormat)
Parameters
nativeFormatAsioSampleType
Returns
Select(AsioSampleType)
Returns a converter for the given native ASIO sample type, or throws NotSupportedException if the format is not supported by the new AsioDevice API.
public static AsioNativeToFloatConverter.ConverterFn Select(AsioSampleType nativeFormat)
Parameters
nativeFormatAsioSampleType