Copyright © 2006-2019 MultiMedia Soft

WaveformAnalyzer.GraphicItemHorizontalLineAdd method

Previous pageReturn to chapter overviewNext page

Remarks

 

Adds a new horizontal line that will be displayed over the waveform's graphics.

 

On the screenshot below you can see a set of horizontal lines displayed over the waveform, each with its own set of properties, positions and buddy text:

 

 

This line can be manually moved on the screen in one of the following ways:

horizontally through code using the WaveformAnalyzer.GraphicItemHorzPositionSet method
vertically through code using the WaveformAnalyzer.GraphicItemVertPositionSet method or through the WaveformAnalyzer.GraphicItemHorizontalLineParamsSet method.
horizontally and vertically through the mouse, causing the CallbackWaveformAnalyzerHorzLineMoved delegate to be invoked.

 

During playback of the loaded sound, the CallbackWaveformAnalyzerHorzLineReached delegate is invoked when playback position reaches the start position of the horizontal line and the CallbackWaveformAnalyzerHorzLineLeaved delegate is invoked when playback position leaves the end position of the horizontal line.

 

This method fails if no sound is currently loaded into the editor.

The horizontal line is automatically destroyed, as all of the other existing graphic items, when the loaded sound is discarded from memory through the RecordedSound.FreeMemory method.

 

A horizontal line can be removed through the WaveformAnalyzer.GraphicItemRemove method and hidden or shown through the WaveformAnalyzer.GraphicItemShow method.

 

For details about graphic items management on the waveform analyzer refer to the How to add graphic items to the Waveform analyzer section.

For details 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 GraphicItemHorizontalLineAdd (

strFriendlyName as String,

strDescription as String,

nStartPosInMs as Int32,

nEndPosInMs as Int32,

settings as WANALYZER_HORIZONTAL_LINE

) as Int16


 

[C#]

public Int16 GraphicItemHorizontalLineAdd (

string strFriendlyName,

string strDescription,

Int32 nStartPosInMs,

Int32 nEndPosInMs,

WANALYZER_HORIZONTAL_LINE settings

);


 

[C++]

public: Int16 GraphicItemHorizontalLineAdd (

string strFriendlyName,

string strDescription,

Int32 nStartPosInMs,

Int32 nEndPosInMs,

WANALYZER_HORIZONTAL_LINE settings

);


 

 

Parameter

Description

 

 

strFriendlyName

Friendly name of the line.

This friendly name can be modified or retrieved at a later time through the WaveformAnalyzer.GraphicItemNameGet and WaveformAnalyzer.GraphicItemNameSet methods.

strDescription

Description of the line.

This description can be modified or retrieved at a later time through the WaveformAnalyzer.GraphicItemDescriptionGet and WaveformAnalyzer.GraphicItemDescriptionSet methods.

nStartPosInMs

Start position expressed in milliseconds

This position can be modified or retrieved at a later time through the WaveformAnalyzer.GraphicItemHorzPositionGet and WaveformAnalyzer.GraphicItemHorzPositionSet methods.

nEndPosInMs

End position expressed in milliseconds

This position can be modified or retrieved at a later time through the WaveformAnalyzer.GraphicItemHorzPositionGet and WaveformAnalyzer.GraphicItemHorzPositionSet methods.

settings

Settings for the new line.

These settings can be modified or retrieved at a later time through the WaveformAnalyzer.GraphicItemHorizontalLineParamsSet and WaveformAnalyzer.GraphicItemHorizontalLineParamsGet methods.

 

 

Return value

 

Value

Meaning

 

 

0

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

Value > 0

Unique identification number assigned to this new line.