Closed goober99 closed 3 years ago
Thanks for bringing this to out attention. - I can reproduce the segfault on MacOS too, so it is a broader problem. The segfault itself is in if (rtaudio_closecb) rtaudio_closecb();
, which is set in rtaudio_register
but I haven't figured out yet, why. I believe it has to do with the definition in modules/rtaudio/rtaudio.scm#L93 being a four-argument function, but the call in apps/DemoRTAudio/main.scm#L82 only calling it with three arguments?
Unless we want to add a three-argument initialization function, the rtaudio_closecb
needs to be set. Updated example code and Wiki to do so.
I'm using rtaudio to generate a tone. I want to be able to stop the tone after a specified amount of time, but whenever I call (rtaudio-stop), the app dies with a segmentation fault.
I'm using Lambda Native 1.1.1 (but also tested with 1.0.13 and had the same issue) on Debian Sid. To make sure it wasn't something else in my code, I added a button to the DemoRTAudio that all it does is call (rtaudio-stop), and it segfaults too:
When you click the Stop button, it segfaults. And here's the GDB backtrace of the segmentation fault with the demo compiled for debug: