cpal icon indicating copy to clipboard operation
cpal copied to clipboard

Popping/hitching in beep example

Open Ralith opened this issue 6 years ago • 5 comments

On Linux with alsa backed by pulse, I'm experiencing extremely erratic artifacts in the beep example. Sometimes they'll occur practically continuously, and sometimes they won't occur at all, but they're common on average and unmistakeable when you hear them.

Ralith avatar May 20 '19 04:05 Ralith

I've encountered the same thing on the master branch (0354548426f7b4c48392cae9876a3e77ea5c1c40) on windows 7... Sometimes I go several minutes without hitches, sometimes they're only a few seconds apart. I've tried checking if it's my audio by listening to a 1000hz sine wave on youtube, and that hasn't yet hitched once. Perhaps this is grasping at straws, but any hitches I encountered occurred when typing in Discord.

swooster avatar May 20 '19 04:05 swooster

On current master, I can only reproduce this by e.g. aggressively cycling between windows while running the example; running heavy compiles in the background doesn't affect it. Other programs like mpv, however, don't glitch no matter what I try, so this remains an issue.

Ralith avatar Jan 17 '20 04:01 Ralith

I wonder if this might be caused by the buffer not being filled up (#432)?

sniperrifle2004 avatar Jun 19 '20 13:06 sniperrifle2004

Can confirm this is still happening on Windows 11: Default output config: SupportedStreamConfig { channels: 2, sample_rate: SampleRate(48000), buffer_size: Unknown, sample_format: F32 }

I upped the length to be 60 seconds and it seems to consistantly click/pop, both on debug & release. This is also with very light load <2% cpu utilization during the entire run.

RobDavenport avatar Jul 07 '22 17:07 RobDavenport