MIDI.SoundPositionGet method |
|
Remarks
Obtains the current position during playback of the MIDI stream.
The current position is calculated respect to the original sound duration and could not represent the effective playback time if a previous playback rate change, performed through a call to MIDI.TempoPercSet and MIDI.BPMSet methods, should occur. If you should need to obtain the effective position in terms of playback time you could use the SoundPositionGet method by setting the bKeepCountOfRateChange parameter to "true".
For further details about the use of MIDI protocol see the MIDIMan class section and the How to deal with MIDI protocol tutorial.
Syntax
[Visual Basic] Public Function SoundPositionGet ( nPlayerIndex as Int16, ByRef fPosition as Double, nPositionUnit as enumMidiPositionUnits ) as enumErrorCodes |
[C#] public enumErrorCodes SoundPositionGet ( Int16 nPlayerIndex, ref double fPosition, enumMidiPositionUnits nPositionUnit ); |
[C++] public: enumErrorCodes SoundPositionGet ( Int16 nPlayerIndex, double __gc *fPosition, enumMidiPositionUnits nPositionUnit ); |
Parameter |
Description |
||||||||||||
|
|
||||||||||||
nPlayerIndex |
Number representing the zero-based index of the involved player |
||||||||||||
fPosition |
Reference that, on return from the method call, will contain the current position; its value depends upon the value of the nPositionUnit parameter below. |
||||||||||||
nPositionUnit |
The unit of measure used for the position value stored inside fPosition parameter above. Supported values are the following:
|
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred (see the LastError property for further error details) |
enumErrorCodes.NOERROR (0) |
The method call was successful. |