Re: Are DS event notifications one-to-one with buffers

From: Chris P. [MVP] (msdn_at_chrisnet.net)
Date: 11/17/04


Date: Wed, 17 Nov 2004 12:01:42 -0500

On Wed, 17 Nov 2004 08:59:02 -0500, Grant Schenck wrote:

> Hello,
>
> If I have a capture or play buffer divided into four slots and I set
> up event notification at the end of each slot am I guaranteed that DS
> will set the event on a one-to-one basis with each completed buffer?
>
> I assume if I am busy doing some processing that, for example, two
> capture buffers could be completed before I went to wait on the
> capture event?
>
> Is that correct?

Correct. Usually it occurs in the event processing code itself. E.g.
you're busy processing the buffer event and in the mean time 2 more buffer
events have gone by.
 
> Are there any scenarios where DS itself would not set the capture or
> play event?

The event will always get set, but if the event is already in a signaled
state (i.e. you're using one event for the entire buffer). If you're using
one event "per slot" then they could all be set to a signalled state
simultaneously.

> In general, do people use one event for all "slots" associated with a
> given buffer or do they use unique events for each slot?

Commonly I see one event for the entire buffer. The event is treated
simply as an interrupt, at which time you check the buffer position and
decide how much data is required in the buffer. This way if you missed
servicing, you can catch up quickly.



Relevant Pages

  • Re: Capturing a really long clip
    ... second one fires you know the second half has data. ... interrogate the position of the buffer at all. ... I have set notification positions for the capture ... When I check the read and capture cursor positions it seems ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Capturing from 2 secondarybuffers
    ... >>> Is it possible to capture from 2 multiple buffer using directsound ... I nned to capture these ... > And also if possible is there any equalization method using directsound as ... > i`ve got stuck as the Parameq effect class was of no use ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Capturing from 2 secondarybuffers
    ... >> Is it possible to capture from 2 multiple buffer using directsound ... I nned to capture these ... And also if possible is there any equalization method using directsound as ... i`ve got stuck as the Parameq effect class was of no use ...
    (microsoft.public.win32.programmer.directx.audio)
  • Play is Skipping whenever there is some activity on PC
    ... private Label labelMainInputformatText; ... public CaptureBuffer applicationBuffer = null; ... // Create DirectSound.Capture using the preferred capture device ... Creates a capture buffer and sets the format ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Real time effects
    ... > I want to be able to do real time effects on an input audio signal, ... > sound card from an external input. ... I know I can capture the sound ... You want to start with a FullDuplex buffer (if you plan ...
    (microsoft.public.win32.programmer.directx.audio)