Copyright © 2008-2019 MultiMedia Soft

WaveformAnalyzer.SnapshotViewGetWidthForWaveform 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 (spectral view is not supported by this method).

The returned value can be assigned to the nBitmapWidth parameter of the WaveformAnalyzer.SnapshotViewSaveToFile and WaveformAnalyzer.SnapshotViewSaveToMemory methods.

 

Before calling this method it's mandatory performing a previous sound's analysis through a call to the WaveformAnalyzer.AnalyzeFullSound method and waiting its completion through the WaveAnalysisDone event.

 

For details about generating a waveform bitmap of the recorded sound and about the use of the Waveform Analyzer refer to the How to use the Waveform Analyzer section.

For further details about methods of the Waveform Analyzer refer to the WaveformAnalyzer class section.

 

 

Syntax

 

[Visual Basic]

Public Function SnapshotViewGetWidthForWaveform (

nStartPos as Int32,

nEndPos as Int32,

ByRef nWidth as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes SnapshotViewGetWidthForWaveform (

Int32 nStartPos,

Int32 nEndPos,

ref Int32 nWidth

);


 

[C++]

public: enumErrorCodes SnapshotViewGetWidthForWaveform (

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 expressed in pixels

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.