delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/06/14/09:35:35

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: Accessing the sound card and microphone
Date: Tue, 14 Jun 2005 14:34:57 +0100
MIME-Version: 1.0
In-Reply-To: <30467.216.208.32.197.1118752166.squirrel@216.208.32.197>
Message-ID: <SERRANORbD0bErOCJp400000045@SERRANO.CAM.ARTIMI.COM>

----Original Message----
>From: eghan020 AT uottawa DOT ca
>Sent: 14 June 2005 13:29

> Hello,
> 
> I have installed the latest version of cygwin on XP and it works fine.
> I'm trying to write a small C application that reads data from a
> Microphone.  Another application is attempting to write data to the sound
> card to be played.
> Does anyone know how to open a connection (file descriptor) to the
> microphone?
> 

  It works the same as the dsp device under linux, so 

    fd = open ("/dev/dsp", O_RDWR); 

should work to a first approximation..... there's a testcase in the cygwin
source code that would serve as a good example, take a look here:

http://cygwin.com/cgi-bin/cvsweb.cgi/src/winsup/testsuite/winsup.api/devdsp.
c?cvsroot=src

or to just download the latest version, you could run 

wget -O devdsp.c
'http://cygwin.com/cgi-bin/cvsweb.cgi/~checkout~/src/winsup/testsuite/winsup
.api/devdsp.c?rev=1.4&cvsroot=src'

at the cygwin shell prompt.

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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