getConfiguredFormat method
Get the configured format.
Implementation
@override
Future<MiniAVAudioInfo> getConfiguredFormat() async {
_ensureNotDestroyed();
final formatOutPtr = calloc<bindings.MiniAVAudioInfo>();
try {
final res = bindings.MiniAV_Loopback_GetConfiguredFormat(
_contextHandle!,
formatOutPtr,
);
if (res != bindings.MiniAVResultCode.MINIAV_SUCCESS) {
throw Exception(
'Failed to get configured loopback format: ${res.name}',
);
}
return AudioInfoFFIToPlatform.fromNative(
formatOutPtr.ref,
).toPlatformType();
} finally {
calloc.free(formatOutPtr);
}
}