From owner-freebsd-multimedia@FreeBSD.ORG Fri Sep 18 11:10:48 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 12D82106566C; Fri, 18 Sep 2009 11:10:48 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id DF4F28FC1B; Fri, 18 Sep 2009 11:10:46 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA10935; Fri, 18 Sep 2009 14:10:39 +0300 (EEST) (envelope-from avg@icyb.net.ua) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1MobMN-000HTI-JI; Fri, 18 Sep 2009 14:10:39 +0300 Message-ID: <4AB36AAD.7040704@icyb.net.ua> Date: Fri, 18 Sep 2009 14:10:37 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20090823) MIME-Version: 1.0 To: Alexander Leidinger References: <4AAF7604.3070304@icyb.net.ua> <20090917161442.176733aid7epmr8k@webmail.leidinger.net> In-Reply-To: <20090917161442.176733aid7epmr8k@webmail.leidinger.net> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Fri, 18 Sep 2009 11:10:48 -0000 on 17/09/2009 17:14 Alexander Leidinger said the following: > 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. Alexander, thanks a lot! madplay -a -6 does indeed produce correct sound. Bad news: despite the magnitude of configuratios options related to 'gain' and 'pre-amp' in audacious2 (all global, nothing specific to mad plugin), I couldn't get it work the same way as madplay. Sound gets quieter but the distortions are not fixed. -- Andriy Gapon