From nobody Tue Feb 10 05:44:26 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1665645139; cv=none; d=zohomail.com; s=zohoarc; b=NtikYPe0jr0SElL36N1QR220JK+7PH/8fbB9sC+s97geTGDtUb2cace2FZ2cuSETb1Bjfa+zWrE+fUgcs40vSzpWtkIH2Ad6WYTBsl3cT44n2YzPjWmUL6JKA1EFPrkTXQdoJ3zntpMDKO2z2ADpUCCY3Flofl95bOCtma85M6I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665645139; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=PbSSy1DRof+fZnCCEXiNYrAAHxMWp1x0ZyKl5mVxys4=; b=Ys+AjC2oQeM0efPApahKUZHB3m3OK54CcuODAASNsyq2TlC8MDRMixNL3cG8seXLE7NDjL2V+2F+Gcq94Uctu9BijJYJcUo+naa+RStEkBfuBAUPbzxQ+w5/WvmF5bEaoM230Gb3XfMQHylgtnQ3BtuNG+fqeQKjbhp6iupIOo0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1665645139086974.0836300443207; Thu, 13 Oct 2022 00:12:19 -0700 (PDT) Received: from localhost ([::1]:44956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oisO6-0006Vo-AW for importer@patchew.org; Thu, 13 Oct 2022 03:12:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ois5B-0005Ft-EO for qemu-devel@nongnu.org; Thu, 13 Oct 2022 02:52:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ois58-0006mh-Md for qemu-devel@nongnu.org; Thu, 13 Oct 2022 02:52:40 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-228-CCzY-uxNN1yHOZB2Px0p7w-1; Thu, 13 Oct 2022 02:52:33 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 77D63811E81; Thu, 13 Oct 2022 06:52:33 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.195.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 099222166BA3; Thu, 13 Oct 2022 06:52:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 67E931800605; Thu, 13 Oct 2022 08:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665643958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PbSSy1DRof+fZnCCEXiNYrAAHxMWp1x0ZyKl5mVxys4=; b=b6ZHTRFnUMG6qFex9hcC9IHOpFY3FwpeoD1Q01K3h2oGilfGSE8LCAfc5j7Fmwt8LHZ648 coc/JW+T/XJ99VVZeq9QEqhRvbVWJyfyDhNOrL7AUlwsaU4441L4pNOnPJJQqvuINXNrds VNeVxJ5k8VoCPrze6SSPszh0C1jDOBQ= X-MC-Unique: CCzY-uxNN1yHOZB2Px0p7w-1 From: Gerd Hoffmann To: qemu-devel@nongnu.org Cc: David Hildenbrand , Gerd Hoffmann , Kashyap Chamarthy , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Markus Armbruster , Eric Auger , Christian Schoenebeck , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , "Michael S. Tsirkin" , Eric Blake , =?UTF-8?q?Volker=20R=C3=BCmelin?= Subject: [PULL 02/26] audio: fix GUS audio playback with out.mixing-engine=off Date: Thu, 13 Oct 2022 08:52:00 +0200 Message-Id: <20221013065224.1864145-3-kraxel@redhat.com> In-Reply-To: <20221013065224.1864145-1-kraxel@redhat.com> References: <20221013065224.1864145-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=kraxel@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1665645304958100001 From: Volker R=C3=BCmelin Fix GUS audio playback with out.mixing-engine=3Doff. The GUS audio device needs to know the amount of samples to produce in advance. To reproduce start qemu with -parallel none -device gus,audiodev=3Daudio0 -audiodev pa,id=3Daudio0,out.mixing-engine=3Doff and start the cartoon.exe demo in a FreeDOS guest. The demo file is available on the download page of the GUSemu32 author. Signed-off-by: Volker R=C3=BCmelin Acked-by: Marc-Andr=C3=A9 Lureau Message-Id: <20220923183640.8314-2-vr_qemu@t-online.de> Signed-off-by: Gerd Hoffmann --- audio/audio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audio/audio.c b/audio/audio.c index 08aec51e7085..29da359b416b 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1139,7 +1139,8 @@ static void audio_run_out (AudioState *s) } =20 if (sw->active) { - sw->callback.fn(sw->callback.opaque, INT_MAX); + sw->callback.fn(sw->callback.opaque, + hw_free * sw->info.bytes_per_frame); } =20 continue; --=20 2.37.3