From patchwork Mon Mar 2 19:08:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Volker_R=C3=BCmelin?= X-Patchwork-Id: 11416171 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5194A14E3 for ; Mon, 2 Mar 2020 19:09:07 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 31C9A20842 for ; Mon, 2 Mar 2020 19:09:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31C9A20842 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=t-online.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:37482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8qR8-0003MT-2U for patchwork-qemu-devel@patchwork.kernel.org; Mon, 02 Mar 2020 14:09:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52891) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j8qQd-0002uk-LZ for qemu-devel@nongnu.org; Mon, 02 Mar 2020 14:08:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j8qQc-0003kE-C9 for qemu-devel@nongnu.org; Mon, 02 Mar 2020 14:08:35 -0500 Received: from mailout01.t-online.de ([194.25.134.80]:46288) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j8qQc-0003j9-6K for qemu-devel@nongnu.org; Mon, 02 Mar 2020 14:08:34 -0500 Received: from fwd15.aul.t-online.de (fwd15.aul.t-online.de [172.20.27.63]) by mailout01.t-online.de (Postfix) with SMTP id 30A2942E105E; Mon, 2 Mar 2020 20:08:31 +0100 (CET) Received: from [192.168.211.200] (JT5870ZSYh137EF-PB8lqZxgZXyWvPjg3EPbY7fK68QIcbfWzHTl2ZGs7s+2DXXZ74@[79.208.28.226]) by fwd15.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1j8qQY-24ZBj60; Mon, 2 Mar 2020 20:08:30 +0100 From: =?utf-8?q?Volker_R=C3=BCmelin?= Subject: [PATCH 0/5] mostly changes related to audio float samples To: Gerd Hoffmann , Eric Blake , Markus Armbruster Message-ID: <417bfe2f-e3c1-d83d-b437-47859daf524d@t-online.de> Date: Mon, 2 Mar 2020 20:08:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Language: en-US X-ID: JT5870ZSYh137EF-PB8lqZxgZXyWvPjg3EPbY7fK68QIcbfWzHTl2ZGs7s+2DXXZ74 X-TOI-MSGID: 398b4faf-ad5c-4a72-a68e-1337d81451aa X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 194.25.134.80 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: John Arbuckle , Howard Spoelstra , Mark Cave-Ayland , QEMU , =?utf-8?b?Wm9sdMOhbiBLxZF2w6Fnw7M=?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Patch "audio: change naming scheme of FLOAT_CONV macros" and patch "audio: consistency changes" should have been a review for ed2a4a7941 "audio: proper support for float samples in mixeng", but I was too slow. Patch "audio: change mixing engine float range to [-1.f, 1.f]" definitely needs to be tested by macOS users. I verified PulseAudio, SDL2 and ALSA (actually libasound) work, but I don't want to introduce a regression for CoreAudio. I spent some time on https://developer.apple.com but I couldn't find the answer if CoreAudio uses the [-1.f, 1.f] range too. The results from my favorite search engine suggest the answer is yes. @Howard: I need your help once again. Can you please test if you can hear (or see) clipping with my patches? Don't forget to set all volume controls in the guest and on the host to 100% or 0dB to get a reliable result. Compared to qemu without these patches I expect the playback volume is a bit louder, but there's still no clipping. Volker RĂ¼melin (5): qapi/audio: add documentation for AudioFormat audio: change naming scheme of FLOAT_CONV macros audio: consistency changes audio: change mixing engine float range to [-1.f, 1.f] audio: fix saturation nonlinearity in clip_* functions audio/mixeng.c | 26 +++++++++++++------------- audio/mixeng_template.h | 22 ++++++++++------------ qapi/audio.json | 14 ++++++++++++++ 3 files changed, 37 insertions(+), 25 deletions(-)