This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Fix dup for /dev/dsp


Gert,

One reason why "cat xxx.wav > /dev/dsp" doesn't work is that
the /dev/dsp driver sets close on exec. It shouldn't.
But it should have a "fixup_after_exec".
One problem is that "new" calls calloc, and that won't be
preserved through execs. You need to use the cygheap
(ccalloc). 
But is it necessary to allocate audio_in/_out at open time, 
rather than when playing start? The flags passed to open are
stored somewhere, so they can be used to determine how the
device was opened.

Also won't hurt to call "nohandle (true)".

One interesting aspect is that /dev/dsp does not have a Windows
handle. But when  fd is < 2, Cygwin will still call SetStdHandle.
Not sure what will happen.

Pierre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]