Microsoft DirectX 9.0 SDK Update (October 2004)

Buffer.SetCurrentPosition Method

Language:

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

Sets the position of the play cursor, which is the point at which the next byte of data is read from the buffer.

Definition

Visual Basic .NET Public Sub SetCurrentPosition( _
    ByVal newPosition As Integer _
)
C# public void SetCurrentPosition(
    int newPosition
);
Managed C++ public: void SetCurrentPosition(
    int newPosition
);
JScript .NET public function SetCurrentPosition(
    newPosition : int
);

Parameters

newPosition System.Int32. An integer that represents the offset of the play cursor, in bytes, from the beginning of the buffer.

Remarks

This method cannot be called on the primary sound buffer.

If the buffer is playing, the cursor immediately moves to the new position and play continues from that point. If it is not playing, playback will begin from the new position the next time the Buffer.Play method is called.

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