From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 7AF68C6FA82 for ; Tue, 27 Sep 2022 13:48:27 +0000 (UTC) Received: from localhost ([::1]:51456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odAwj-0004C9-Fu for qemu-devel@archiver.kernel.org; Tue, 27 Sep 2022 09:48:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od9Al-0002hC-30 for qemu-devel@nongnu.org; Tue, 27 Sep 2022 07:54:55 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]:34703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1od9Aj-0006ag-7U for qemu-devel@nongnu.org; Tue, 27 Sep 2022 07:54:46 -0400 Received: by mail-lf1-x130.google.com with SMTP id j16so15362620lfg.1 for ; Tue, 27 Sep 2022 04:54:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=4Q5z4x/syjTqHk3lNH8iwsVxf9UBBhanNEDd0Ur8cNo=; b=fu501IV9dQhdXB8urwQoTDdti7QqXqGLpgNZrdZTPt3YFyfTM8uDe/B4UieoKkQghs 4TzR5C/+HwGFHIWEeNK9TkDkNEX7RcgevEAkriZrUO1ijtxB0PBgBdSPPp17EvP7xgX2 EsUWOA6/EbtlyzwP3eNXY6GPaF0kwbyR0Mm/nyerjz4K7aSfZ4bnwa7E+FTqxMj4A0I0 TyJdhB7iHIDup5OEHFXld7gvc/IcjxsuE2LAkRJ2Rr4nNsJWLD5m288ys7uP/8gVMH7a /JBsdgejG/6CwCzhV5uZm+ge2h8OkXoZcaelEdcGDPZbVV+4HWUvarNqoSyuGEJ+iB81 bo0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=4Q5z4x/syjTqHk3lNH8iwsVxf9UBBhanNEDd0Ur8cNo=; b=6FrxTfqKL93pDW5RNYNBTaj8GVeTskJbofnLanTiwD+8MadU6S2RqxVUQAj1IYPjJx +YAY1XNRkkwz2982ajXDp/swmLDDk8PxhG6Tx/uwcfe9oc2gK+E3rS/MotiBPOOCD9lb Vu8owAghznYWripqMJP3W/1m7hJjU9xE0OP+bnm5lhrhQSCUYbiumGm1f4EaUQkJVvSb nl38wg6DN55zFA13qvzofCxB1fsUM7YEEpfTgJaEar0IRyTFFjlZlCFRFBzVsNgqx9tm 9Az4wgn0Xh85zASZpq1QYQf8QVOmt9UK2AI+0xMAI1fsEZWFfQhMpYG7ATGMu3xwXLVZ iSOw== X-Gm-Message-State: ACrzQf1er05vDfR7Moys8xyxKrX9wVHzdHMf1O78To0+lzchZZi2TDdU yoJn4iR6qaPL3/HCQCFxcSk21zind477eHGpl2k= X-Google-Smtp-Source: AMsMyM6ONdjmvuDS8g4Kd6iT8BceiE+AJ32HgM0DKYjNCP+Fyi/Q+myoea7qrA7t2nxJ7B1OEubllmHeQEye5VFiO+U= X-Received: by 2002:a05:6512:280d:b0:498:fd40:51d4 with SMTP id cf13-20020a056512280d00b00498fd4051d4mr11981502lfb.167.1664279683667; Tue, 27 Sep 2022 04:54:43 -0700 (PDT) MIME-Version: 1.0 References: <38d7417a-fc26-be39-6a63-99c79ee15fc9@t-online.de> <20220923183640.8314-2-vr_qemu@t-online.de> In-Reply-To: <20220923183640.8314-2-vr_qemu@t-online.de> From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Tue, 27 Sep 2022 15:54:30 +0400 Message-ID: Subject: Re: [PATCH 02/12] audio: fix GUS audio playback with out.mixing-engine=off To: =?UTF-8?Q?Volker_R=C3=BCmelin?= Cc: Gerd Hoffmann , qemu-devel@nongnu.org Content-Type: multipart/alternative; boundary="0000000000005a1d6805e9a74f35" Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=marcandre.lureau@gmail.com; helo=mail-lf1-x130.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --0000000000005a1d6805e9a74f35 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Fri, Sep 23, 2022 at 10:39 PM Volker R=C3=BCmelin = wrote: > 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 > lgtm Acked-by: Marc-Andr=C3=A9 Lureau > --- > audio/audio.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/audio/audio.c b/audio/audio.c > index 04f685fe24..343786243d 100644 > --- a/audio/audio.c > +++ b/audio/audio.c > @@ -1139,7 +1139,8 @@ static void audio_run_out (AudioState *s) > } > > if (sw->active) { > - sw->callback.fn(sw->callback.opaque, INT_MAX); > + sw->callback.fn(sw->callback.opaque, > + hw_free * sw->info.bytes_per_frame); > } > > continue; > -- > 2.35.3 > > > --=20 Marc-Andr=C3=A9 Lureau --0000000000005a1d6805e9a74f35 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Fri, Sep 23, 2022 at 10:39 PM Volk= er R=C3=BCmelin <vr_qemu@t-online.de> wrote:
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 <vr_qemu@t-online.de>

<= /div>
lgtm
Acked-by: Marc-Andr=C3=A9 Lureau <marcandre.lureau@= redhat.com>

=C2=A0
---
=C2=A0audio/audio.c | 3 ++-
=C2=A01 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/audio/audio.c b/audio/audio.c
index 04f685fe24..343786243d 100644
--- a/audio/audio.c
+++ b/audio/audio.c
@@ -1139,7 +1139,8 @@ static void audio_run_out (AudioState *s)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (sw->active) {
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sw->callback.fn= (sw->callback.opaque, INT_MAX);
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sw->callback.fn= (sw->callback.opaque,
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 hw_free * sw->info.bytes_per_fram= e);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0continue;
--
2.35.3




--
Marc-Andr= =C3=A9 Lureau
--0000000000005a1d6805e9a74f35--