Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 May 2025 20:55:15 +0200
From:      Christos Margiolis <christos@freebsd.org>
To:        Goran =?utf-8?B?TWVracSH?= <meka@tilda.center>
Cc:        freebsd-multimedia@freebsd.org
Subject:   Re: Memory mapped OSS device
Message-ID:  <qwfryatrkxslcu74cgg7vuqax2khpnuyma5uuglbebhdqqhu4x@q6cpoucfkett>
In-Reply-To: <f2e2bef2-2a45-4e70-894f-ad287f29ac37@tilda.center>

index | next in thread | previous in thread | raw e-mail

Hello again Meka,

Goran Mekić wrote:
> 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.

Pulseaudio seems to be doing mmap, so you could get some inspiration
from there as well:

https://github.com/pulseaudio/pulseaudio/tree/master/src/modules/oss

Christos


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?qwfryatrkxslcu74cgg7vuqax2khpnuyma5uuglbebhdqqhu4x>