From 1c3107254be0b921c752f114460232a695624ec8 Mon Sep 17 00:00:00 2001 From: Etienne Dechamps Date: Mon, 27 May 2024 09:57:52 +0100 Subject: [PATCH] Fix GetLatencies() not working on streams This fixes a regression introduced by a typo in 59f75ce183431f8b50f7f209790090c5a608b08e. The reason why that obviously wrong code compiled is because of a type safety trainwreck: PaStream* is an alias of void*, which can be implicitly converted from anything, and we accidentally passed a PaStream** instead of a PaStream*. Oops. Fixes #231 --- src/flexasio/FlexASIO/flexasio.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flexasio/FlexASIO/flexasio.cpp b/src/flexasio/FlexASIO/flexasio.cpp index d22c58b..57fe84b 100644 --- a/src/flexasio/FlexASIO/flexasio.cpp +++ b/src/flexasio/FlexASIO/flexasio.cpp @@ -823,7 +823,7 @@ namespace flexasio { long FlexASIO::ComputeLatencyFromStream(PaStream* stream, bool output, size_t bufferSizeInFrames) const { - const PaStreamInfo* stream_info = Pa_GetStreamInfo(&stream); + const PaStreamInfo* stream_info = Pa_GetStreamInfo(stream); if (!stream_info) throw ASIOException(ASE_HWMalfunction, "unable to get stream info"); // See https://github.com/dechamps/FlexASIO/issues/10.