-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working with SBCL on Mac os #3
Comments
FWIW this seems to be an issue with OS X/CoreAudio itself, as I've had reports of the same issue appearing in a native implementation for CoreAudio. See Shirakumo/harmony#3. It's possible this doesn't crop up elsewhere as other languages/implementations ignore division by zero signals. |
I get the same error as @anquegi when running It seems like it's having trouble with these checks: Maybe those could be optional checks, toggled by some option to |
Like everything FFI in SBCL, you need to ignore floating point exceptions. Try this @belambert, @anquegi
|
I seem to be getting almost the same issue, but unsolved by masking float traps:
It hangs at that point and never continues to the next device; here is the stack when I C-c C-c:
Anyone seen similar?
TIA! |
For whatever reason, in my case the problem appears to be When I shadow
|
In case this is of any value, the bug doesn't occur for me at all (
(although I do find it interesting that my default ALSA output device reportedly supports 192khz sampling, which does not appear to actually work when opened as such- is there a better way to determine what sample formats and rates a given device will accept?) |
Hm this is interesting- portaudio's
|
On macOS, I started SBCL, quickloaded cl-portaudio and ran the quoted example in a loop a few thousand times and didn't get a hang. When I see CL-USER in your example output I wonder if you're trying it from SLIME or SLY. Have you tried it from outside of SLIME/SLY with just cl-portaudio loaded? Perhaps portaudio and SLIME/SLY are disagreeing on underlying thread coordination... |
Ahh good call @lispnik , it does indeed work as expected when I do what you suggested:
This is the backtrace I got today doing exactly the same thing in SLIME:
Any suggestions what route I should follow to try to figure out where the difference between plain-sbcl and invocation lies? I am unfortunately ignorant as to the innerworkings of SLIME et al, but if you can tell me what area of the docs to check out I might be able to make some progress. Thanks! |
Try one of the other SLIME communication styles: https://slime.common-lisp.dev/doc/html/Communication-style.html |
OK, here are my results trying all four methods, conveniently commented in my swank init:
I didn't spend much time trying to figure out why the package wouldn't load using
In any event, it is cool that |
Just wanted to add, this fixed the issue for me (macOS 14.3.1, M2 pro). Thank you for your help! |
This library is working well using CCL on MacBook Pro with sierra at least the sample echo from here and print-devices the only problem is that you must shadow the symbol portaudio:terminate.
I'm using
and
But working with SBCL (print-devices) never returns
CL-USER> (print-devices)
PortAudio version number = 1246720
PortAudio version text = PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396139a4
Number of devices = 3
---------------------- device 0
[ Default Input ]
Name = Built-in Microphone
Host API = Core Audio
Max inputs = 2, Max outputs = 0
Default low input latency = 0.0029
Default low output latency = 0.0100
Default high input latency = 0.0247
Default high output latency = 0.1000
Default sample rate = 44100.0000
Supported standard sample rates
for half-duplex float 32 bit 2 channel input =
<===== Hangs here forever
Then when I stop the process I get this stack:
and when I try to run the example:
I get this error depending only the first time, if I execute print-devices or this again it only hangs
The text was updated successfully, but these errors were encountered: