From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F2ADv-000534-Sz for qemu-devel@nongnu.org; Thu, 26 Jan 2006 11:43:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F2ADq-0004xS-2W for qemu-devel@nongnu.org; Thu, 26 Jan 2006 11:43:50 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F2ADo-0004wK-Ns for qemu-devel@nongnu.org; Thu, 26 Jan 2006 11:43:45 -0500 Received: from [62.89.75.144] (helo=bozon2.softax.com.pl) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1F2ABP-0005BL-GO for qemu-devel@nongnu.org; Thu, 26 Jan 2006 11:41:15 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by bozon2.softax.com.pl (Postfix) with ESMTP id B7C15DC024 for ; Thu, 26 Jan 2006 17:40:47 +0100 (CET) Received: from bozon2.softax.pl ([127.0.0.1]) by localhost (bozon2.softax.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16388-10 for ; Thu, 26 Jan 2006 17:40:45 +0100 (CET) Received: from [16.193.144.98] (unknown [16.193.144.98]) by bozon2.softax.com.pl (Postfix) with ESMTP id E111BDC009 for ; Thu, 26 Jan 2006 17:40:45 +0100 (CET) Message-ID: <43D8FF0C.5020903@softax.com.pl> Date: Thu, 26 Jan 2006 17:55:40 +0100 From: Sebastian Kaliszewski MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] PC speaker emulation (square wave) References: <43C2CA44.9080504@bellard.org> <66187480-AA25-4749-B6E7-8630B804A6EA@gmx.de> <43D0D1A4.4090304@softax.com.pl> <43D61F14.8080209@softax.com.pl> <4EECB3A5-BFC6-4003-BABF-A1EC5ED958E6@gmx.de> <43D67218.9000107@softax.com.pl> <43D6A008.30606@bellard.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Joachim Henke wrote: > Ok, I simplified my patch to generate just plain square waves. Indeed, > its sound is much closer to a real PC speaker now. > > Does "cut off frequency" mean, that we have silence above that specific > frequency? No. Typical cutoff freq is where components of the signal are attenuated by 3dB (i.e. are half as loud). At 2 times taht frequency they'll be attenuated by 3 + A dB, where A is filter's rate in dB/octave. Typical 1st order filter is 6dB/octave, 2nd order is 12dB/octave, etc. Typical soundards used no more than 2nd order filter. But, if you want to have your path behave really nicely, you should simply not generate at all waves at frequencies above half of current output sampling rate -- those can't be reproducted -- instead significant distortion will be generated (google for Nyquist frequency). rgds -- Sebastian Kaliszewski