andrewrk / libsoundio

C library for cross-platform real-time audio input and output
http://libsound.io/
MIT License
1.92k stars 229 forks source link

sio_sine plays for a moment then stops #247

Open spencerkohan opened 3 years ago

spencerkohan commented 3 years ago

I have built the examples from source on a Raspberry Pi 4, and when I run the sio_sine example, it plays for a moment, and then quckly cuts off and becomes non-responsive.

The program output is this:

Backend: ALSA
ALSA lib pcm_dsnoop.c:575:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
Output device: snd_rpi_hifiberry_dacplus, HiFiBerry DAC+ HiFi pcm512x-hifi-0: Default Audio Device
Software latency: 0.008000
'p\n' - pause
'u\n' - unpause
'P\n' - pause from within callback
'c\n' - clear buffer
'q\n' - quit
unable to set channel layout: incompatible device

And then the program hangs and will not accept input.

Is this a known issue, and is there a way to solve it?

spencerkohan commented 3 years ago

Also this is the output I get from unit tests:

$ ./unit_tests 
testing os_get_time...OK
testing create output stream...ALSA lib pcm_dsnoop.c:575:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
OK
testing mirrored memory...OK
testing soundio_device_nearest_sample_rate...OK
testing ring buffer basic...OK
testing ring buffer threaded...OK

Seems like there is a problem creating the output stream?