Memory mapped OSS device

From: Goran_Mekić <meka_at_tilda.center>
Date: Wed, 09 Apr 2025 12:47:55 UTC
Hello,

I am trying to learn about mmap mode of OSS and so far I have this: 
https://github.com/mekanix/freebsd-src/blob/audio-mmap/share/examples/sound/oss/audio.c. 
So the device is initialized properly and my code doesn't break trying 
to write something past the length of the buffer, but I do get strange 
sound. I am using 
http://manuals.opensound.com/developer/mmap_test.c.html as reference and 
the difference that I implemented is that I'm trying to "guess" how long 
I have to sleep so that when I wake up (and maybe wait a little bit 
more), I can write the whole buffer. If anybody knows what I'm doing 
wrong here, please help me.

Regards,
meka