CVS commit: src/lib/libossaudio

2019-11-02 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Nov  2 11:48:23 UTC 2019

Modified Files:
src/lib/libossaudio: ossaudio.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libossaudio/ossaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/lib/libossaudio

2019-11-02 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Nov  2 11:48:23 UTC 2019

Modified Files:
src/lib/libossaudio: ossaudio.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/lib/libossaudio/ossaudio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libossaudio/ossaudio.c
diff -u src/lib/libossaudio/ossaudio.c:1.36 src/lib/libossaudio/ossaudio.c:1.37
--- src/lib/libossaudio/ossaudio.c:1.36	Sat Feb  2 04:52:16 2019
+++ src/lib/libossaudio/ossaudio.c	Sat Nov  2 11:48:23 2019
@@ -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 
-__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 @@ audio_ioctl(int fd, unsigned long com, v
 		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);



re: CVS commit: src/lib/libossaudio

2014-05-17 Thread matthew green

Izumi Tsutsui writes:
> nat@ wrote:
> 
> > Module Name:src
> > Committed By:   nat
> > Date:   Sat May 17 12:38:42 UTC 2014
> > 
> > Modified Files:
> > src/lib/libossaudio: ossaudio.c soundcard.h
> > 
> > Log Message:
> > Adds ioctls and defines for OSSv4 compatibility.
> > 
> > The ioctl definitions and accompanying structures were
> > taken from FreeBSD's soundcard.h, hopefully providing
> > some binary compatibility.
> 
> If new ioctls are added, shouldn't we bump at least minor in shlib_version
> to denote API additions?

good point!  nat, can you handle this?


.mrg.


Re: CVS commit: src/lib/libossaudio

2014-05-17 Thread Izumi Tsutsui
nat@ wrote:

> Module Name:  src
> Committed By: nat
> Date: Sat May 17 12:38:42 UTC 2014
> 
> Modified Files:
>   src/lib/libossaudio: ossaudio.c soundcard.h
> 
> Log Message:
> Adds ioctls and defines for OSSv4 compatibility.
> 
> The ioctl definitions and accompanying structures were
> taken from FreeBSD's soundcard.h, hopefully providing
> some binary compatibility.

If new ioctls are added, shouldn't we bump at least minor in shlib_version
to denote API additions?

---
Izumi Tsutsui