On Thu, 28 Nov 2024 10:40:03 -0600 izzy Meyer <izder...@disroot.org> wrote:
> WRT the sndio quirks, the latest commit from this project is 7 years old, > safe to say that it may be dormant, I'll look into possibly forking and > fixing up sndio support later- cos I too, have the same crackling issue on > occassion. izzy, would you take sthen's changes and mail a new .tar.gz of the port? I found 2 causes for a .wav to make a crackling sound, 1. If the .wav has unsigned 8-bit (u8) audio, sndiod(8) has a bug. See my mail to tech@, "sndiod: unsigned sample 0 is not silent" https://marc.info/?l=openbsd-tech&m=173372300424229&w=2 2. If the .wav has chunks after its "data" chunk, and you don't use nxbelld -c, then nxbelld wrongly plays those chunks as noise. My quack.wav has u8 and has a "smpl" chunk after "data", so I heard both problems. One can work around both problems by using ffmpeg or sox to write a .wav with signed 16-bit audio; those tools put "data" at end of file. Example with sox -e signed, $ sox in.wav -e si out.wav nxbelld -c uses the correct length of the "data" chunk, but nxbelld without -c continues from "data" to end of file. Patches would fix it, but I don't want to wait for patches before OpenBSD imports the port. --gkoehler