OSDN Git Service

* fhandler_dsp.cc (fhandler_dev_dsp::Audio): Add fh member.
authorcorinna <corinna>
Wed, 4 May 2011 11:41:21 +0000 (11:41 +0000)
committercorinna <corinna>
Wed, 4 May 2011 11:41:21 +0000 (11:41 +0000)
commitce4bafeaafd80ff796d83fce5ea5d5e83676f5e8
treebbb5db3367406b6dfbd9a0d75569c4248b0b2cfc
parent59a336c21f9887f087e3a42b889668edf50d0c43
* fhandler_dsp.cc (fhandler_dev_dsp::Audio): Add fh member.
(fhandler_dev_dsp::Audio_out::Audio_out): Take pointer to encapsulating
fhandler_dev_dsp as parameter.
(fhandler_dev_dsp::Audio_in::Audio_in): Ditto.
(fhandler_dev_dsp::Audio::Audio): Take pointer to encapsulating
fhandler_dev_dsp as parameter and store in fh.
(fhandler_dev_dsp::Audio_out::write): Change return type to int and
return number of bytes written.  Return -1 if waitforspace returns false
and no bytes have been written so far.
(fhandler_dev_dsp::Audio_out::waitforspace): Change return type to bool.
Handle O_NONBLOCK.  Make waiting loop interruptible and cancelable.
Return false in any of these cases, otherwise true.
(fhandler_dev_dsp::Audio_in::read): Set returned nBytes to -1 if
waitfordata returns false and nothing has been read so far.
(fhandler_dev_dsp::Audio_in::waitfordata): Change return type to bool.
Handle O_NONBLOCK.  Make waiting loop interruptible and cancelable.
Return false in any of these cases, otherwise true.
(fhandler_dev_dsp::write): Call Audio_out constructor with this as
parameter.
(fhandler_dev_dsp::read): Call Audio_in constructor with this as
parameter.
winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_dsp.cc