Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 07-06-2020, 11:56 AM   #1
edechamps
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
Old 07-06-2020, 03:46 PM   #2
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,750
Default

Thanks for letting us know, we'll remove that early call for the next development build.
schwa is offline   Reply With Quote
Old 07-08-2020, 08:10 AM   #3
schwa
Administrator
 
schwa's Avatar
 
Join Date: Mar 2007
Location: NY
Posts: 15,750
Default

This fix is in the +dev0707 prerelease build, if you'd care to test it.
schwa is offline   Reply With Quote
Old 07-08-2020, 09:19 AM   #4
billybk1
Human being with feelings
 
billybk1's Avatar
 
Join Date: Jun 2006
Location: Atlanta, GA
Posts: 1,507
Default

Quote:
Originally Posted by schwa View Post
This fix is in the +dev0707 prerelease build, if you'd care to test it.
I guess this previous behavior was related to my Apollo Twin X Thunderbolt always crashing REAPER to the desktop, before the app could fully open when the TB ASIO driver was pre-selected. I never understood why, as the Apollo TB ASIO driver worked flawlessly in every other Win DAW app I have (Studio One 4, Live 10, Cakewalk by Bandlab, Reason 11, etc). Which was odd, as I had previously used the Apollo Twin USB version (using the USB ASIO drivers) for years in REAPER and it would work as expected. I upgraded to the Apollo Twin X Thunderbolt version (now using TB ASIO drivers) a few months back and REAPER starting crashing every time when first initializing the TB ASIO drivers upon opening the app. Still worked as expected using the current REAPER MAC version though.

Anyway, I can confirm the Apollo TB ASIO is working as expected in REAPER with this fix!

Last edited by billybk1; 07-08-2020 at 09:28 AM.
billybk1 is offline   Reply With Quote
Old 07-08-2020, 10:39 AM   #5
edechamps
Human being with feelings
 
Join Date: Jul 2020
Posts: 2
Default

Quote:
Originally Posted by schwa View Post
This fix is in the +dev0707 prerelease build, if you'd care to test it.
I can't reproduce the issue in build dev0707, so I believe this is fixed. Thanks!
edechamps is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:27 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.