Ticket #75 (closed defect: duplicate)
blocking i/o not implemented for directsound
| Reported by: | rossb | Owned by: | rossb |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | host-api-dsound | Version: | 2.0 |
| Keywords: | Cc: |
Description
ReadStream? and WriteStream? are not implemented for DirectSound?. DirectSound? already provides ring buffers, and methods for querying their current state, so the main thing which is needed is to set up a timer to wake up the ReadStream?() and WriteStream?() functions when they are blocking.
One way to do this would be to write a high-precision sleep function which sets up a multimedia timer to signal an Event object, and then to block on the even object (also use a timeout to ensure the event object doesn't block forever). ReadStream/WriteStream? would sleep for long enough that they whole buffer space they are hoping to fill gets filled (or perhaps some fraction of the ringbuffer size.
