View Single Post
Old 07-06-2020, 11:56 AM   #1
Human being with feelings
Join Date: Jul 2020
Posts: 2
Default [v6.12c] Reaper makes invalid ASIO call to setSampleRate() before init() (FIXED)

I am the developer of the FlexASIO universal ASIO driver. I recently received a bug report where FlexASIO crashes with Reaper v6.12c/x64.

In the course of the investigation, I noticed that when the "Request sample rate" checkbox is checked, Reaper calls IASIO::setSampleRate() on the ASIO driver object before even calling IASIO::init().

In my view, this is a breach of the ASIO API contract. The official ASIO SDK 2.3 documentation strongly hints that a call to setSampleRate() can only be made after "the driver is initialized" (section II/3), and the official "glue layer" code in the SDK is written in such a way that a call to IASIO::setSampleRate() cannot occur before IASIO::init() (see ASIOSetSampleRate() in common/asio.cpp).

It would be nice if this bug in the Reaper ASIO driver initialization code could be fixed, as it will trigger undefined behaviour in ASIO drivers in general.
edechamps is offline   Reply With Quote