Source-Changes-HG archive

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

[src/trunk]: src/lib/libossaudio Use record.sample_rate for recording on SNDC...



details:   https://anonhg.NetBSD.org/src/rev/255b87965fb0
branches:  trunk
changeset: 460743:255b87965fb0
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Nov 02 11:48:23 2019 +0000

description:
Use record.sample_rate for recording on SNDCTL_DSP_SPEED.
Fix PR lib/54667.

diffstat:

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

diffs (30 lines):

diff -r 37be02c7adbe -r 255b87965fb0 lib/libossaudio/ossaudio.c
--- a/lib/libossaudio/ossaudio.c        Sat Nov 02 07:56:25 2019 +0000
+++ b/lib/libossaudio/ossaudio.c        Sat Nov 02 11:48:23 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ossaudio.c,v 1.36 2019/02/02 04:52:16 isaki Exp $      */
+/*     $NetBSD: ossaudio.c,v 1.37 2019/11/02 11:48:23 isaki Exp $      */
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: ossaudio.c,v 1.36 2019/02/02 04:52:16 isaki Exp $");
+__RCSID("$NetBSD: ossaudio.c,v 1.37 2019/11/02 11:48:23 isaki Exp $");
 
 /*
  * This is an OSS (Linux) sound API emulator.
@@ -134,7 +134,10 @@
                retval = ioctl(fd, AUDIO_GETBUFINFO, &tmpinfo);
                if (retval < 0)
                        return retval;
-               INTARG = tmpinfo.play.sample_rate;
+               if (tmpinfo.mode == AUMODE_RECORD)
+                       INTARG = tmpinfo.record.sample_rate;
+               else
+                       INTARG = tmpinfo.play.sample_rate;
                break;
        case SNDCTL_DSP_STEREO:
                AUDIO_INITINFO(&tmpinfo);



Home | Main Index | Thread Index | Old Index