Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Sep 2018 18:21:27 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r478888 - head/audio/xanalyser/files
Message-ID:  <201809031821.w83ILRUo001675@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Mon Sep  3 18:21:27 2018
New Revision: 478888
URL: https://svnweb.freebsd.org/changeset/ports/478888

Log:
  audio/xanalyser: fix a ioctl call (now for real)
  
  - SNDCTL_DSP_GETBLKSIZE() is in FreeBSD a read only ioctl()
    Need to use SNDCTL_DSP_SETBLKSIZE() to really set the blocksize.
  
  PR:           193373
  Submitted by: hselasky
  Reviewed by:  Walter Schwarzenfeld <w.schwarzenfeld@utanet.at>
  Approved by:  db (maintainer)

Added:
  head/audio/xanalyser/files/patch-src_pcm-oss.cc   (contents, props changed)

Added: head/audio/xanalyser/files/patch-src_pcm-oss.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/xanalyser/files/patch-src_pcm-oss.cc	Mon Sep  3 18:21:27 2018	(r478888)
@@ -0,0 +1,12 @@
+--- src/pcm-oss.cc	2014-09-06 09:44:07.000000000 +0200
++++ src/pcm-oss.cc	2014-09-06 09:45:02.000000000 +0200
+@@ -100,7 +100,8 @@
+     }
+ 
+     int tmp_buffer_size = want_buffer_size;
+-    if (ioctl (fd, SNDCTL_DSP_GETBLKSIZE, &tmp_buffer_size) == -1) {
++    if (ioctl (fd, SNDCTL_DSP_SETBLKSIZE, &tmp_buffer_size) == -1 ||
++	ioctl (fd, SNDCTL_DSP_GETBLKSIZE, &tmp_buffer_size) == -1) {
+ 	cerr << "error " << strerror (errno) << '\n';
+ 	return;
+     }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809031821.w83ILRUo001675>