Ticket #55 (new enhancement)
Opened 12 months ago
Directsound callback scheduling could be improved
| Reported by: | rossb | Owned by: | rossb |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | host-api-dsound | Version: | 2.0 |
| Keywords: | Cc: |
Description
The PortAudio DS callback scheduling is based on a polling timer with a fixed period. This could be improved by rescheduling the timer according to when the next callback is predicted to occurr (ie poll at shorter intervals as the callback deadline gets closer.
In DX8 and above there is also a IDirectSoundNotify8 interface:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directx9_c/IDirectSoundNotify8.asp
seb@plogue says:
I did some quick tests with the dx sdk examples and it seems to be working fine : you set up a list of positions to be notified at inside the buffer, i.e. you can have a 64k buffer and ask to be notified every 4k, then you get called back when the driver is at that position
it's ds8 only (although that could be checked at runtime and still have the current implementation for non-ds8+) <<<
