Choppy audio using virtual_oss

Goran Mekić meka at tilda.center
Tue Aug 7 08:52:43 UTC 2018


On Tue, Aug 07, 2018 at 09:23:26AM +0200, Hans Petter Selasky wrote:
> Hi,
>
> First of all are you using the latest version of virtual_oss from ports?
> There was a minor ODELAY() fix recently.
I'm on 1.1.6

> Second, can you check the CPU usage of virtual_oss when the sound is choppy?
I tried VLC, and it works like a charm, so we can ignore the problem
with MPV. I guess it does something weird with OSS. The reason I used it
is because it knows how to mix 5.1 to stereo. If I find how to do that
with VLC, MPV will be removed.

As when playing Ardour, CPU is 80-105%, which is OK for 4 core CPU.

> 384/88200 = 0.0043537 seconds buffering. I suggest you use a buffer size
> which is a factor of the buffer_ms value, like:
>
> 88200 * 0.002 = 177
>
> Personally I think you should use 4ms buffering when you deal with that many
> channels to avoid underflows.

So if I got it right, this is what you suggest:
virtual_oss -T /dev/sndstat -S -i 8 -C 18 -c 18 -r 88200 -b 32 -s 708 -f /dev/dsp1 -c 2 -d dsp -c 18 -d vdsp.jack -t vdsp.ctl -M i,0,8,0,0,0 -M i,0,9,0,0,0 -M i,6,8,0,0,0 -M i,6,9,0,0,0
jackd -r -d oss -r 88200 -C /dev/vdsp.jack -P /dev/vdsp.jack -i 18 -o 18 -p 708

It gives best results so far, as ardour chops less, but it still does it
few times per second, not a constant "rrrrr" sound on top of mix.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-multimedia/attachments/20180807/582b83cd/attachment.sig>


More information about the freebsd-multimedia mailing list