Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libossaudio ossaudio(3): Do not reuse results from AUDIO...



details:   https://anonhg.NetBSD.org/src/rev/4966cbd11f5a
branches:  trunk
changeset: 979192:4966cbd11f5a
user:      nia <nia%NetBSD.org@localhost>
date:      Sat Dec 19 12:55:28 2020 +0000

description:
ossaudio(3): Do not reuse results from AUDIO_GETBUFINFO in SETINFO

Should help PR 55876.

diffstat:

 lib/libossaudio/ossaudio.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r ba3ea1a7ce7e -r 4966cbd11f5a lib/libossaudio/ossaudio.c
--- a/lib/libossaudio/ossaudio.c        Sat Dec 19 12:48:59 2020 +0000
+++ b/lib/libossaudio/ossaudio.c        Sat Dec 19 12:55:28 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ossaudio.c,v 1.64 2020/11/13 09:02:39 nia Exp $        */
+/*     $NetBSD: ossaudio.c,v 1.65 2020/12/19 12:55:28 nia Exp $        */
 
 /*-
  * Copyright (c) 1997, 2020 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: ossaudio.c,v 1.64 2020/11/13 09:02:39 nia Exp $");
+__RCSID("$NetBSD: ossaudio.c,v 1.65 2020/12/19 12:55:28 nia Exp $");
 
 /*
  * This is an Open Sound System compatibility layer, which provides
@@ -183,7 +183,6 @@
                /* This call is merely advisory, and may be a nop. */
                break;
        case SNDCTL_DSP_SPEED:
-               AUDIO_INITINFO(&tmpinfo);
                /*
                 * In Solaris, 0 is used a special value to query the
                 * current rate. This seems useful to support.
@@ -208,6 +207,7 @@
                        INTARG = 1000;
                if (INTARG > 192000)
                        INTARG = 192000;
+               AUDIO_INITINFO(&tmpinfo);
                tmpinfo.play.sample_rate =
                tmpinfo.record.sample_rate = INTARG;
                retval = ioctl(fd, AUDIO_SETINFO, &tmpinfo);



Home | Main Index | Thread Index | Old Index