delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/05/02/07:17:00

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type; q=dns; s=default; b=yx1J3QNcw3dm7Es/h2y1j3r2TLhPF
pr9Dygcz6UgXD9xahEtwMYBQv2AJ62cIccX2K8nev23ftQePqxTdrqQxIkBwFzln
yVMfmHCEB6y68M9FbRYXBaS+rdOXRmD15s+sxlLURnp2IIV8Voi/NXdgqEMPb2e6
y6XgOMF3oGlQHg=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type; s=default; bh=4v0CsNvBhL9LjhacFM7qJzPy7Nw=; b=qIh
b/GspV9AAD49WEb4JABTkf5cwv6re9swLzgb1mkSUCGEFfxglT4RrIAsVXu06kzX
RsX7SO2WG30X7r+x064JQ8hK1kznsoD6RYKW97SUl6bzeY++GVIdhCvgcdWQI6iH
MD5brKBpftkEQRhL01uwKCD3orgZuq4slx8hLTGA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-pa0-f41.google.com
X-Received: by 10.66.122.101 with SMTP id lr5mr33476345pab.130.1399029399020; Fri, 02 May 2014 04:16:39 -0700 (PDT)
Message-ID: <53637E89.2060404@gmail.com>
Date: Fri, 02 May 2014 19:16:25 +0800
From: JonY <10walls AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.0
MIME-Version: 1.0
To: The Cygwin Mailing List <cygwin AT cygwin DOT com>
Subject: ioctl crash in mpg123
X-IsSubscribed: yes

--vWqhFqDl7HmiPgX1fbAr6BgwK5kIVQM8s
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi,

I am debugging a crash in Cygwin 1.7.29-2 ioctl but I am not familiar
with the OSS sounds API. I traced the ioctl calls and made this example,
is it supposed to work?

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/soundcard.h>

int main(){
  int fmt =3D AFMT_MU_LAW;
  int chan =3D 0;
  int fd =3D open("/dev/dsp", O_WRONLY);
  ioctl(fd, SNDCTL_DSP_RESET, NULL);
  ioctl(fd, SNDCTL_DSP_RESET, NULL);
  ioctl(fd, SNDCTL_DSP_RESET, NULL);
  ioctl(fd, SNDCTL_DSP_SETFMT, &fmt);
  ioctl(fd, SNDCTL_DSP_STEREO, &chan); /* crashes here */
  close(fd);
  exit(0);
}


--vWqhFqDl7HmiPgX1fbAr6BgwK5kIVQM8s
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (MingW32)

iQIcBAEBAgAGBQJTY36OAAoJEHE7X+KcFF1F5aoP/2WgtHPZQpGazX6Uhf7GYHXF
guXRHpCL/ZAJKlDDbhPOH9X33ZbBNqMaYe56xxW/NXjclPI4PkI8Rml2yM0UM6mT
8WWfidVsb//uOU7FdwOkbabzz7lMp7enEf1KgrxXR4JOHqbjWHIwgzAt5sFCa9L3
3qqixSJjgGPHIo/6CUKU/nJVYlnKTC7XKh1hLZGBA10Uog+MKjecSj5R9aEf2Fff
L5gu0XU16P/6RvAONdXyea1zT47pdEGuw8qu5FoUwYDsFDbSttoYrv4+yXYpimcX
AnmWjrszbGZg8CKovcC0V+74c2NGt4OITD0Ll3f+PSC3hBpnuxASrm4wQt3c+S2l
848dCE7WHPyFVwrVJhZbVVj+wBH4si2CGarl4lWYKqCi4wpGx9de7FbSgJowdZqG
Sk5wngw5JgcMosTGey/jwSbi4HPu1rJJ7AhoT9MdrmKUlKnMTww6TOaUH/7NLIWN
+ncgcvx2ZWgzRcMSDvUuf0kEqA47CpSFSwpIS12fw4XrTbIcRvd7lRDyOit6ioHU
2M0PWVwt55W17OsHwck2RUDTfO3fasNxZeJYO6E0eSIHY+sWzKT/qkioM3oeudq/
LBZuZKu74vfQdf5fIKTGAsjS+jfBTWIHG95EluXsy95kCtY6JNyF4cY420vba7mz
mLE0Y+FXiu7c/5W0H1ea
=nepe
-----END PGP SIGNATURE-----

--vWqhFqDl7HmiPgX1fbAr6BgwK5kIVQM8s--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019