From owner-freebsd-multimedia@freebsd.org Tue Aug 7 08:52:43 2018 Return-Path: Delivered-To: freebsd-multimedia@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 986701053497 for ; Tue, 7 Aug 2018 08:52:43 +0000 (UTC) (envelope-from meka@tilda.center) Received: from mail.tilda.center (srv02.tilda.center [199.247.21.11]) by mx1.freebsd.org (Postfix) with ESMTP id 326B98461A for ; Tue, 7 Aug 2018 08:52:43 +0000 (UTC) (envelope-from meka@tilda.center) Received: from hal9000.home.meka.rs (unknown [87.116.183.13]) by mail.tilda.center (Postfix) with ESMTPSA id 152971204C; Tue, 7 Aug 2018 10:52:41 +0200 (CEST) Date: Tue, 7 Aug 2018 10:52:40 +0200 From: Goran =?utf-8?B?TWVracSH?= To: Hans Petter Selasky Cc: freebsd-multimedia@freebsd.org Subject: Re: Choppy audio using virtual_oss Message-ID: <20180807085240.mcyaj2siqwtydjyj@hal9000.home.meka.rs> References: <20180807003145.7m55dlakppucpkt2@thinker.home.meka.rs> <57293b09-97c6-8b89-24eb-2497529f2ba5@selasky.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="k7x63lt3laqekgnt" Content-Disposition: inline In-Reply-To: <57293b09-97c6-8b89-24eb-2497529f2ba5@selasky.org> User-Agent: NeoMutt/20180716 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2018 08:52:43 -0000 --k7x63lt3laqekgnt Content-Type: text/plain; charset=utf-8 Content-Disposition: inline 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. --k7x63lt3laqekgnt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE1WIFkXy2ZeMKjjKEWj1TknovrLYFAltpXdQACgkQWj1Tknov rLZGaQ//e1Dx3u9a2OhBkMqkNbmjdaMF400UroUdADX7brAYxMKCitjFLEljOTy4 fMaYnTyvx70iGk0bwZ0fQnMCDPdzA+Pq5cDh1YXFA8NntncJDkg13LiQtFXs2Zc3 jHnN4XJz6I+GYu/nA9GBEiB3ovow5vNydMHR8xJhJxPjKW6uLh9N5dPBgoKDttVd ZOGgLMacFTxv7sRDSG2WvnWLKbGTGLaP4U9Ld7a26P5EmoGQ3+y9PHyTxYMSQkGz /iAYNC/zgoiNvvYSDT/74wXsT4eU95mCHeI9QiQUlw3fSBip6TlwztH9FVr6sP8t 4WXq6DRE5Hx71qczC4Ie/cCEUDy4IyVe98ZvCefEYoyZTQGSwYSQpYYhyvTVdAEk qgX+GyDb9MLoS4KC8Zy1dt1YBk5VBjevhL+Bb1Dc5k8QX+jZ9xIuQ+SKNzX5a9Xz cvj5vKSnx1klluiZKhYmB/akkZ+g2m/nu4q9mq2Lj5fFKIWZb7lUEqJvXH3CA2dB eA66H4tvs66HiRYInSZHcVFFumXJm3C/pap+9GOTkyIRMyCFA2VdTNKVCSfgA3tE vced8wvPwgQKabx85k4vYtdrdk5L83nLcAsM5IqTmpiC477CrmnwBexv2LjnIokS +ESNqp1Ld87NIpB2PId19/JtlUPqJitSQSiY2lKBU+DjrJfi9T0= =7Bh7 -----END PGP SIGNATURE----- --k7x63lt3laqekgnt--