Buffer.GetCurrentPosition(Int32,Int32) Method (Microsoft.DirectX.DirectSound)
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] int% currentPlayPosition, [Out] int% currentWritePosition ); |
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 | 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