Open klingtnet opened 8 years ago
The pulseaudio stream works when pavucontrol
runs besides the sine
example. This is strange. Can somebody reproduce this @ul?
Here is a small video proof (I can't record audio with gnome's default screencaster).
Yes, I confirm that weirdness! The example works with pavucontrol
running on my system too, and doesn't work w/o it!
The original sine
example writes always max_frame_count
frames, which does indeed help a bit. I've updated the example in the master branch 0e6f0f8 to write max_frame_count
frames, too. The output is still distorted, even though it now outputs a continuous signal.
Pulseaudio outputs only a single buffer of audio and then stops the output. This issue occurs for other users as well (#6). Getting pulseaudio's debug output is not as straight-forward as one might think, at least not on Arch Linux machines running Gnome 3. To get the debug log use the following steps:
autospawn=no
to your~/.config/pulse/client.conf
(or/etc/pulse/client.conf
, but the former one is preferred)systemctl --user stop pulseaudio
systemctl --user top pulseaudio.socket
to prevent pa from respawningkillall pulseaudio
pulseaudio -vvvvv --log-level=debug --log-time --daemonize=no
Running
cargo run --release --example sine
produced the following log output: