Remarks
Given a range in milliseconds, calculates the number of pixels required for displaying the waveform's view.
The returned value can be assigned to the nBitmapWidth parameter of the Waveform.BitmapViewSaveToFile and Waveform.BitmapViewSaveToMemory methods.
Before calling this method it's mandatory performing a previous sound's analysis through a call to the Waveform.AnalyzeFullSound method and waiting its completion through the WaveAnalysisDone event.
For further details about generating a waveform bitmap of the loaded sound, before starting its playback, refer to the How to obtain the sound's waveform tutorial.
Syntax
[Visual Basic]
control.Waveform.BitmapViewGetWidth (
nPlayer as Integer,
nStartPos as Long,
nEndPos as Long
) as Long
|
|
[C++]
long control.Waveform.BitmapViewGetWidth (
short nPlayer,
long nStartPos,
long nEndPos
);
|
|
Parameter
|
Description
|
|
|
nPlayer
|
Number representing the zero-based index of the player that will use the Waveform
|
nStartPos
|
Number representing the sound's position, expressed in milliseconds, where the waveform's view begins.
The value 0 represents the sound's beginning.
|
nEndPos
|
Number representing the sound's position, expressed in milliseconds, where the waveform's view ends.
The value -1 represents the sound's end.
|
Return value
Value
|
Meaning
|
|
|
Negative value
|
An error occurred (see the LastError property for further error details)
|
Value > 0
|
The method call was successful and the returned value represents the width in pixels of the waveform's view
|
|