Microsoft DirectX 9.0 SDK Update (October 2004)

Buffer.GetCurrentPosition Method

Language:

Note: This documentation is preliminary and is subject to change.

Retrieves the position of the play and write cursors in the sound buffer.

Definition

Visual Basic .NET Public Sub GetCurrentPosition( _
    ByRef currentPlayPosition As Integer, _
    ByRef currentWritePosition As Integer _
)
C# public void GetCurrentPosition(
    out int currentPlayPosition,
    out int currentWritePosition
);
Managed C++ public: void GetCurrentPosition(
    int *currentPlayPosition,
    int *currentWritePosition
);
JScript .NET public function GetCurrentPosition(
    currentPlayPosition : int,
    currentWritePosition : int
);

Parameters

currentPlayPosition System.Int32. An integer that receives the offset, in bytes, of the play cursor position in the sound buffer.
currentWritePosition System.Int32. An integer that receives the offset, in bytes, of the write cursor position in the sound buffer.

Remarks

The write cursor is the point in the buffer ahead of which it is safe to write data to the buffer. Data should not be written to the part of the buffer after the play cursor and before the write cursor.

Exceptions
ArgumentException Leave Site An invalid parameter was passed to the called method.
InvalidCallException The method call is invalid for the current state of this object.
PriorityLevelNeededException A cooperative level of Priority or higher is required.

Applies To

SecondaryBuffer

© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center