BufferPositionNotify.Offset Property (Microsoft.DirectX.DirectSound)

Retrieves and sets the offset from the beginning of the buffer where the notify event is to be triggered, or PositionNotifyFlag.OffsetStop.

Definition

Visual Basic Public Property Offset As Integer
C# public int Offset { get; set; }
C++ public:
property int Offset {
        int get();
        void set(int value);
}
JScript public function get Offset() : int
public function set Offset(int);

Property Value

System.Int32
The offset from the beginning of the buffer where the notify event is to be triggered, or PositionNotifyFlag.OffsetStop.

This property is read/write. 

Remarks

Setting this property to PositionNotifyFlag.OffsetStop causes the event to be signaled when playback or capture stops, either because the end of the buffer has been reached (and playback or capture is not looping) or because the application called stop method of the buffer.

In order to set this property with the PositionNotifyFlag.OffsetStop flag, you must cast it to an integer, as done in the following code.

[C#]BufferPositionNotify.Offset = (int)PositionNotifyFlag.OffsetStop;

When a playback buffer was created with BufferDescription.DeferLocation and BufferDescription.ControlPositionNotify along with any voice management flag, it is possible that a sound that has notifications set, but not yet reached, will be terminated by the voice manager. In this case, no event is signaled.