-
Notifications
You must be signed in to change notification settings - Fork 0
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
Audio on organelle #6
Comments
The alsa-rs package has synth-example, this does not work on device on Organelle OS 4.0:
The errors repeat and no audio seems to come out. Error comes from snd_pcm_avail_update. The synth-example calls snd_pcm_recover but the problem repeats each time. |
I am trying to find an example that actually works. This works:
This calls: snd_pcm_open(), snd_pcm_hw_params_malloc(), snd_pcm_hw_params_any(), snd_pcm_hw_params_set_rate_resample(), snd_pcm_hw_params_set_access(), snd_pcm_hw_params_set_format(), snd_pcm_hw_params_set_channels(), snd_pcm_hw_params_set_rate_near(), snd_pcm_hw_params(), snd_pcm_hw_params_get_buffer_size(), snd_pcm_hw_params_get_sbits(), snd_pcm_prepare(). It doesn't try to play or capture any audio. |
This required some fixing up to work. Source attached: t2.c.txt I have got to a point where it mostly runs and should generate noise, but no sound comes out. (aplay /dev/random does produce noise). |
I hacked this to play all the notes at start instead of waiting for the sequencer. It produced a sound!! This one does not use This suggests the problem is in the mmap emulation API that the synth-example uses:
The cpal library does NOT use this access method so I won't debug the synth-example further. |
cpal
The
Seems a bug in how cpal populates Interestingly:
|
I have added some tracing to
This is when input_devices() is called...
Iterator finishes as we match the name of the card we wanted. This is when output_devices() is called...
Interesting thing: ^^ why is direction: None here??!! These don't get returned, so we continue iterating...
And we don't find the match. |
Here's a doc from alsa-lib
NULL means both. alsa::device_name::Hint::new sets |
In cpal::alsa::enumerate::Devices, the code processes the Hint by trying to open the device: Feedback.rs example hasn't opened the device, so perhaps cpal isn't closing it properly? The same issue occurs on my desktop:
|
I gave up on ALSA completely. Implementing my own pipline using One last attempt to get this to work: use JACK. This produces sound:
This produce an error:
CPAL
|
Bypassing cpal and using rust-jack works: using playback_capture example:
|
Currently audio on Organelle using 'cpal' does not work.
The issue seems to be that
audio_host.input_devices()
returns an empty list; even thougharecord -L
does not.The text was updated successfully, but these errors were encountered: