Skip to content

Commit

Permalink
Fix GetLatencies() not working on streams
Browse files Browse the repository at this point in the history
This fixes a regression introduced by a typo in
59f75ce.

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
  • Loading branch information
dechamps committed May 27, 2024
1 parent 1c0e750 commit 1c31072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flexasio/FlexASIO/flexasio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1c31072

Please sign in to comment.