Copyright © 2013-2017 MultiMedia Soft

BitmapViewGetWidth method

Previous pageReturn to chapter overviewNext page

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]

Public Function BitmapViewGetWidth (

nStartPos as Int32,

nEndPos as Int32,

ByRef nWidth as Int32

) as enumWanErrorCodes


 

[C#]

public enumWanErrorCodes BitmapViewGetWidth (

Int32 nStartPos,

Int32 nEndPos,

ref Int32 nWidth

);


 

[C++]

public: enumWanErrorCodes BitmapViewGetWidth (

Int32 nStartPos,

Int32 nEndPos,

Int32 __gc *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