diwic / alsa-rs

Thin but safe ALSA wrappers for Rust
Apache License 2.0
139 stars 66 forks source link

Microphone recording example? #85

Closed beckend closed 2 years ago

diwic commented 2 years ago

For now there is some test code here: https://github.com/diwic/alsa-rs/blob/master/src/pcm.rs#L1031

diwic commented 2 years ago

Fixed now: https://github.com/diwic/alsa-rs/blob/master/examples/record.rs

beckend commented 2 years ago

Thank you, I however tried to open it in non blocking mode to write buffers, it gives me:

`Err` value: Error("snd_pcm_readi", Sys(EAGAIN))'

Why is that?

beckend commented 2 years ago

Never mind I got it working by polling the fds.