From owner-freebsd-multimedia Thu Jan 30 12:38:54 2003 Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7418C37B401 for ; Thu, 30 Jan 2003 12:38:53 -0800 (PST) Received: from puma.icir.org (puma.icir.org [192.150.187.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id 264BF43F3F for ; Thu, 30 Jan 2003 12:38:53 -0800 (PST) (envelope-from hodson@puma.icir.org) Received: from puma.icir.org (localhost [127.0.0.1]) by puma.icir.org (8.12.3/8.12.3) with ESMTP id h0UKcl8J072094 for ; Thu, 30 Jan 2003 12:38:47 -0800 (PST) (envelope-from hodson@puma.icir.org) Message-Id: <200301302038.h0UKcl8J072094@puma.icir.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.3 From: Orion Hodson To: freebsd-multimedia@freebsd.org Subject: vchans crackle Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 30 Jan 2003 12:38:47 -0800 Sender: owner-freebsd-multimedia@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org There have been a few threads on this list about noise when running with virtual sound channels enabled. When virtual channels are enabled the device runs at a fixed rate of 44.1kHz and audio streams are up or down sampled to this rate before being mixed and passed on the device. It turns out rounding errors in the sample rate converter code for certain non-integer conversions were the source of the noise. This would be an issue, if watching DivX/MPEG movies with 48kHz sound tracks or an application recording at n*8kHz. There is a re-worked rate converter in the tree that should fix this problem. If you've been bitten by the vchans noise, or would like to try it out, the file is available with fetch: fetch -o feeder_rate.c 'http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/src/sy s/dev/sound/pcm/feeder_rate.c?rev=1.6&content-type=text/plain' It replaces ${SRC}/sys/dev/sound/pcm/feeder_rate.c on FreeBSD versions 4.4 upwards. Ken Marx has helped locate most of the teething problems and the code has now been through fairly rigorous scripted testing. It is supposed to be solid now :-). If you try it out, I'd greatly appreciate feedback on how good or bad it performs !*#. Thanks - Orion ! see the handbook for how to enable vchans before testing :-). http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/sound-setup.html#AE N18432 * it's just a linear interpolator, so there is a problem with aliasing noise (typically sounds like background sushing). You'll probably only notice this when downsampling. There is filtering code to follow to get this. # There is a nit in the vchan code that causes that 44.1kHz mono streams play at double speed. The fix for this is not yet in the tree. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-multimedia" in the body of the message