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 object section.

 

 

Syntax

 

[Visual Basic]

control.WaveformAnalyzer.SnapshotViewGetWidthForWaveform (

nStartPos as Long,

nEndPos as Long,

nWidth as Long

) as enumErrorCodes


 

[C++]

short control.WaveformAnalyzer.SnapshotViewGetWidthForWaveform (

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 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