From owner-freebsd-multimedia@FreeBSD.ORG Thu Sep 17 14:33:13 2009 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 688FF1065672; Thu, 17 Sep 2009 14:33:13 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id E6A808FC15; Thu, 17 Sep 2009 14:33:12 +0000 (UTC) Received: from outgoing.leidinger.net (pD9E2CA73.dip.t-dialin.net [217.226.202.115]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id D577D8445EC; Thu, 17 Sep 2009 16:14:46 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 81A6792074; Thu, 17 Sep 2009 16:14:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1253196883; bh=U6d7v9kU5IwuVRluoZovaLVvDdVBelnLK4OIDX7pxQQ=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=WiXLAd2thfraKzm5ZE0aaNhSbrYcyZI/GYF/l628CgMZSeJPSmeiV3weZPCSbi7iT tdPd4vOF4KbUuI9PZNabGY25wPtB7R9v793LYRr+O4KoSlz+ho2soBfY07wDYFgamd F7jjcZRAcI+5WkouNew9OT2V5g/iPZ0knSZZTg/Y6s2zHZ88n9CnejQM09PTtO/3UP r+157YotE4O+sgF7ca10RUhkqfbgWrn1JYWwTKm511sankZBeBd4BRVV9zCeiuSumg oFRZaZ4BLboCYbPpEGhVvyXYC+tK0F4UfxCtzv5piBSfflZmXeYq2BQxJjLQsEEMbC 6q+L6JKCA8W/A== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n8HEEgID064216; Thu, 17 Sep 2009 16:14:42 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Thu, 17 Sep 2009 16:14:42 +0200 Message-ID: <20090917161442.176733aid7epmr8k@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Thu, 17 Sep 2009 16:14:42 +0200 From: Alexander Leidinger To: Andriy Gapon References: <4AAF7604.3070304@icyb.net.ua> In-Reply-To: <4AAF7604.3070304@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) 4.3.3 / FreeBSD-8.0 X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: D577D8445EC.86432 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.44, required 6, autolearn=disabled, ALL_TRUSTED -1.44, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1253801687.99195@TbfznC5ng6nw34Nrz7z7vg X-EBL-Spam-Status: No Cc: freebsd-multimedia@FreeBSD.org, Dirk Meyer , Oliver, Lehmann Subject: Re: libmad mp3 distortions X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2009 14:33:13 -0000 Quoting Andriy Gapon (from Tue, 15 Sep 2009 14:09:56 +0300): > > I can reproduce the following on two very different machines: one is > older Intel > CPU/chipset, i386 stable/7; the other is newer AMD CPU/chipset, amd64 head. > When I play certain MP3 files with any player that uses libmad for > MP3 decoding, > there are some very loud distortions from time to time. Something like what > happens when too strong signal gets clipped. > Examples of the programs: audacious2, mpg321. > On the other hand, mpg123 plays the same files without any quality problems. > > I wonder if anybody else sees this too and if, perhaps, this is a > known problem. Have you tried to play it with "madplay -v -a -6"? This will lower the volume by 6dB. IIRC this is still with the sound before the conversation to PCM. If this prevents the clipping, then it is normal. The reason is that because of rounding (and other operations) the value of a sample can be higher (or lower) than originally. If it was at the max level before, it can now exceed the max -> clipping. madplay is following the rules very strictly (and IIRC working with higher precision and bitsize), while other players have bigger mathematical errors. This would explain then, why you see this with madplay but not with other players. The problem I describe is not in the decoding step, the problem is at the encoding level. Bye, Alexander. -- There is no statute of limitations on stupidity. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137