Ticket #75 (closed defect: duplicate)

Opened 6 months ago

Last modified 6 months ago

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.

Change History

Changed 6 months ago by rossb

  • status changed from new to closed
  • resolution set to duplicate

duplicate of #56

Note: See TracTickets for help on using tickets.