MIDI.SoundDurationGet method |
|
Remarks
Obtains the duration of the loaded MIDI stream.
This method keeps count of eventual tempo changes so the reported duration may vary depending upon the current tempo. If you should need retrieving the original duration of the loaded song you should use the SoundDurationGet method by setting the bKeepCountOfRateChange parameter to "BOOL_FALSE".
For further details about the use of MIDI protocol see the MIDI object section and the How to deal with MIDI protocol tutorial.
Syntax
[Visual Basic] control.MIDI.SoundDurationGet ( nPlayer as Integer, fDuration as Double, nPositionUnit as enumMidiPositionUnits ) as enumErrorCodes |
[C++] short control.MIDI.SoundDurationGet ( short nPlayer, double *fDuration, short nPositionUnit ); |
Parameter |
Description |
|||||||||
|
|
|||||||||
nPlayer |
Number representing the zero-based index of the involved player |
|||||||||
fDuration |
Reference that, on return from the method call, will contain the duration of the loaded MIDI stream; its value depends upon the value of the nPositionUnit parameter below. |
|||||||||
nPositionUnit |
The unit of measure used for the position value stored inside fDuration parameter above. Supported values are the following:
|
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred, check the LastError property value in order to get the error code |
enumErrorCodes.ERR_NOERROR (0) |
The method call was successful |