BitmapViewGetWidth method |
|
Remarks
Given a range in milliseconds, calculates the number of pixels required for displaying the waveform's view in horizontal.
The returned value can be assigned to the nBitmapWidth parameter of the BitmapViewSaveToFile and BitmapViewSaveToMemory methods.
Before calling this method it's mandatory performing a previous sound's analysis through a call to the AnalyzeSoundFromFile or AnalyzeSoundFromFileRaw methods and waiting its completion through the WaveAnalysisDone event.
Syntax
[Visual Basic] control.BitmapViewGetWidth ( nStartPos as Long, nEndPos as Long, nWidth as Long ) as enumWanErrorCodes |
[C++] short control.BitmapViewGetWidth ( long nStartPos, long nEndPos, long *nWidth ); |
Parameter |
Description |
|
|
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. |
nWidth |
Reference that, after returning from the method call, will contain the width in pixels. |
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred (see the LastError property for further error details) |
enumWanErrorCodes.ERR_WAN_NOERROR (0) |
The method call was successful |