Buffer.GetCurrentPosition Method

Language:

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

Definition

Visual Basic Public Sub GetCurrentPosition( _
    ByRef currentPlayPosition As Integer, _
    ByRef currentWritePosition As Integer _
)
C# public void GetCurrentPosition(
    out int currentPlayPosition,
    out int currentWritePosition
);
C++ public:
void GetCurrentPosition(
    [Out] intcurrentPlayPosition,
    [Out] intcurrentWritePosition
);
JScript 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

Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

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