Trouble getting input on mac using cpal

I’m having trouble getting any sign of callbacks when using cpal to input audio on mac. Is this something that is currently supported? A look at the issues on github suggests that cpal is unmaintained, and doesn’t work well on Mac. If cpal isn’t supported, is there another crate I could switch to?

If anyone wants to help, my code is at here.

Thanks!

cpal works on macOS. I think your issue is not keeping the let stream value in scope.

The stream will stop when that is dropped, if it’s scoped to the if blocks it won’t work.

See augmented-audio/crates/augmented/application/audio-processor-standalone at master · yamadapc/augmented-audio · GitHub for example