Introduction

Copyright © 2013-2017 MultiMedia Soft

Introduction

Return to chapter overview

Active Waveform Analyzer is an ActiveX custom control developed by MultiMedia Soft that makes it easy to add sound waveform analysis capabilities to applications written with the most widely-used development environments that accept ActiveX controls.

Active Waveform Analyzer comes with native decoding capabilities for many audio formats and leverages decoding capabilities of Microsoft Media Foundation and Microsoft DirectShow for audio and video formats not supported natively.

Active Waveform Analyzer can be easily integrated with existing third-party audio libraries like Leadtools Multimedia SDK, BASS, FMOD and any other multimedia library supporting the possibility to start a playback session and/or the possibility to decode and provide the PCM data for rare or custom audio formats.

Some tutorial is available to help you beginning your developments with this powerful control.

Brief summary of available features:

Audio analysis

Graphical features

Misc features

Supported target systems

Audio analysis

· Decoding and analysis of the following audio formats (for a full list of encodings supported by the single audio formats available on the table below see the Appendix A - Encodings for audio formats supported natively section):

- Microsoft WAV | - Free Lossless Audio Codec - FLAC | - OGG Vorbis
- Header-less RAW | - Apple AIFF / SGI / AIFC | - Apple CAF
- Commodore Amiga IFF / SVX | - Creative VOC | - Fasttracker 2 XI
- GNU Octave 2.0 MAT4 | - GNU Octave 2.1 MAT5 | - HMM Tool Kit - HTK
- IRCAM SF | - Paris Audio File - PAF | - Portable Voice Format - PVF
- Sound Designer II - SD2 | - Soundforge W64 | - Sphere Nist WAV
- Sun / DEC / NeXT AU / SND |  |

· Decoding and analysis of media formats (audio and video) supported by Microsoft Media Foundation (only on Windows Vista and higher versions); for a full list of supported media formats, please, see the related Microsoft Media Foundation page on the MSDN web site.
· Decoding and analysis of media formats (audio and video) through Microsoft DirectShow: depending upon the format of the media file, there could be the need to install specific DirectShow codecs.
· Analysis of audio streams whose PCM data is provided by external third-party libraries.
· Support for multi-channel audio files (up to 7.1)
· Deep analysis at different resolutions of the sound's waveform.

Graphical features

· Rich and fully configurable visualization capabilities with possibility to perform range selection, zooming and panning of the waveform.
· Fully configurable waveform scroller allowing manual and automatic movement of the waveform.
· Support for adding custom and configurable graphic items to the displayed waveform.
· Support for drawing the waveform representation inside a graphical device context (HDC).
· Support for saving the waveform representation into a graphic file.

Misc features

· Being an ActiveX control, it can be instanced inside HTML code also and used in order to analyze media files from the client browser directly.
· Easy integration with applications developed using our Active DJ Studio ActiveX control.
· Easy integration with applications developed using third-party audio libraries like Leadtools Multimedia SDK, BASS, FMOD and any other multimedia library supporting the possibility to start a playback session.
· Dedicated Visual Editor for easy configuration of the control's user interface at Design-time.

Supported target systems

· Windows XP (x86 and x64 versions)
· Windows Server 2003 (x86 and x64 versions)
· Windows Vista (x86 and x64 versions)
· Windows Server 2008 (x86 and x64 versions)
· Windows 7 (x86 and x64 versions)
· Windows 8 (x86 and x64 versions)
· Windows 10 (x86 and x64 versions)

IMPORTANT NOTES:

For redistribution of the control with your application, we recommend taking a close look to the Files to be included with your application section.


Release notes

Release notes

================================================================

"Active Waveform Analyzer" ActiveX control - Release notes

================================================================

1 - Welcome

2 - Sample projects

3 - Documentation

4 - Support

================================

1 - Welcome

================================

Welcome to the "Active Waveform Analyzer" ActiveX control developed by MultiMedia Soft

================================

2 - Sample projects

================================

Inside the installation folder (default "c:\program files\Active Waveform Analyzer\Samples") you will find some sample project provided as an integration to the documentation in order to allow having immediate and easy usage samples of this component.

In order to be able running/compiling some of the sample projects, there will be the need to install the specific third-party multimedia library used for demonstrating how to integrate our component; the third-party library, if not specified otherwise, should be manually copied inside the same folder where the project's exe will be created or, in alternative, inside a folder included inside the "PATH" environment variable, for example inside the "Windows\System32" folder

- BassIntegration: requires the availability of the Bass.dll library available at http://www.un4seen.com

- FModIntegration: requires the availability of the FModex.dll library available at http://www.fmod.org

- DjStudioIntegration: requires the installation inside the development environment of the "Active Dj Studio" (ActiveX component) from http//www.multimediasoft.com/amp3dj

- LeadtoolsIntegration: requires the installation inside the development environment of the "Leadtools Multimedia SDK" from http//www.leadtools.com

================================

3 - Documentation

================================

The documentation file, Active_Waveform_Analyzer.chm, is available inside the folder were "Active Waveform Analyzer" has been installed (default "c:\program files\Active Waveform Analyzer")

================================

4 - Support

================================

For technical or sales assistance, please, use the form available on our web site

http://www.multimediasoft.com/contact


Copyright information

Copyright information

© Copyright MultiMedia Soft 2013-2017. ALL RIGHTS RESERVED

MultiMedia Soft product specifications are subject to change without notice.

Trademarks

Active Waveform Analyzer is a registered trademark of MultiMedia Soft.

Active DJ Studio is a registered trademark of MultiMedia Soft.

Windows, ActiveX, Visual C++, Visual Basic and Visual Studio.NET are registered trademarks of the Microsoft Corporation.

All other brand or product names used in this online help are trademarks of their respective holders.


License agreement

License agreement

PLEASE READ THE FOLLOWING LICENSE AGREEMENT. IT WILL BE NECESSARY FOR YOU TO AGREE TO BE BOUND BY THE TERMS OF THIS AGREEMENT BEFORE BEING PERMITTED TO CONTINUE TO USE THE PRODUCT.

VERY IMPORTANT-CAREFULLY READ : This MultiMedia Soft License Agreement (hereinafter "LICENSE") is a legal agreement between you (either an individual or a single entity) and MultiMedia Soft, for the "Active Waveform Analyzer" ActiveX component (hereinafter " SOFTWARE ").

By installing, copying or otherwise using the SOFTWARE, you agree to be bound by the terms of this LICENSE. If you do not agree to the terms of this LICENSE, you cannot use this SOFTWARE for any purposes.

The SOFTWARE is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE is licensed, not sold.

I. LICENSE GRANT for "COMMERCIAL EDITION". This LICENSE grants you the following rights:

A. The SOFTWARE's license is "PER DEVELOPER": this means that one single software developer may use this SOFTWARE on one or more computers until no other developers have access to the computer in order to develop the application that will contain the SOFTWARE. The SOFTWARE is in "use" on a computer when it is loaded into temporary memory (i.e. RAM) or installed into permanent memory (e.g. hard disk, CD-ROM, or other storage device) of that computer. However, installation on a network server for the sole purpose of internal distribution to one or more other computer(s) shall not constitute "use" for which a separate license is required.

B. Solely with respect to electronic documents included with the SOFTWARE, you may make a copy (either in hardcopy or electronic form), provided that the number of copies made shall not exceed the number of licenses you own for that SOFTWARE, and further provided that such copies shall be used only for internal purposes and are not republished or distributed to any third party.

C. You may use the trial versions of the SOFTWARE for the limited purposes of demonstrations and trials.

II. Deprecated.

III. TITLE; COPYRIGHT. All title and copyrights in and to the SOFTWARE (including but not limited to any images, photographs, animation, video, audio, music and text incorporated into the SOFTWARE), and any copies of the SOFTWARE are owned by MultiMedia Soft. The SOFTWARE is protected by copyright laws and international treaty provisions. Therefore, you must treat the SOFTWARE like any other copyrighted material, except that you may either (A) make one copy of the SOFTWARE solely for backup or archival purposes or (B) install the SOFTWARE on a single computer provided you keep the original solely for backup or archival purposes.

IV. ADDITIONAL RIGHTS AND LIMITATIONS.

A. Reverse Engineering, Decompilation, and Disassembly. You may not reverse engineer, decompile, or disassemble the SOFTWARE.

B. No Separation of Components. The SOFTWARE is licensed as a single product and the software programs comprising the SOFTWARE may not be separated for use by more than one user at a time.

C. Rental. You may not rent or lease the SOFTWARE.

D. Software Transfer. You may NOT transfer any of your rights under this LICENSE without written permission by MultiMedia Soft. With the "PERSONAL EDITION" no license transfer is allowed.

E. Temporary LICENSE Transfer for outsourcing development purposes. You may transfer your LICENSE to another developer for the amount of time requested to complete the outsourced development: the transfer must be requested to MultiMedia Soft and, in any case, You are not allowed to request more than one transfer to outsourced developers. With the "PERSONAL EDITION" no license transfer is allowed.

F. Termination. Without prejudice to any other rights, MultiMedia Soft may terminate this LICENSE if you fail to comply with the terms and conditions of this LICENSE. In such event, you must destroy all copies of the SOFTWARE.

V. REDISTRIBUTABLE COMPONENTS.

A. Sample Code. In addition to the license granted in Section 1, MultiMedia Soft grants you the right to use and modify the source code versions of those portions of the SOFTWARE which are identified in the documentation as the Sample Code and located in the \SAMPLES(xx) subdirectory(s) of the SOFTWARE provided you comply with section 4.c.

B. Redistributable Code. In addition to the license granted in Section 1, MultiMedia Soft grants you a nonexclusive, royalty-free right to reproduce and distribute the object code version of those portions of the SOFTWARE designated in the SOFTWARE as (i) those portions of the SOFTWARE which are identified in the documentation as the OCX ("OCX") Control; (ii) those portions of the SOFTWARE which are identified in the documentation as REDISTRIBUTABLE DLLs ("DLLs"); and (iii) SAMPLE CODE (collectively, "REDISTRIBUTABLES"), provided you comply with Section 4.c.

C. Redistribution Requirements. If you redistribute the REDISTRIBUTABLES, you agree to (i) distribute the REDISTRIBUTABLES in object code form only in conjunction with and as part of your software application product which adds significant and primary functionality and which is designed, developed, and tested to operate in the Microsoft Windows and/or Windows NT environments; (ii) not use MultiMedia Soft's name, logo or trademarks to market your software application product; (iii) include a valid copyright notice on your SOFTWARE; (iv) indemnify, hold harmless, and defend MultiMedia Soft from and against any claims or lawsuits, including attorney's fees, that arise or result from the use and distribution of your software application product; and (v) not permit further distribution of the REDISTRIBUTABLES by your end user.

LIMITED WARRANTY. EXCEPT WITH RESPECT TO REDISTRIBUTABLES, WHICH ARE PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, MULTIMEDIA SOFT WARRANTS THAT THE SOFTWARE WILL PERFORM SUBSTANTIALLY IN ACCORDANCE WITH THE ACCOMPANYING ONLINE HELP MATERIALS.

NO OTHER WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MULTIMEDIA SOFT DISCLAIMS ALL OTHER WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH REGARD TO THE SOFTWARE. THIS LIMITED WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS. YOU MAY HAVE OTHERS, WHICH VARY FROM STATE/JURISDICTION TO STATE/JURISDICTION.

NO LIABILITIES FOR CONSEQUENTIAL DAMAGES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL MULTIMEDIA SOFT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF MULTIMEDIA SOFT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES AND JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

LICENSEE ACKNOWLEDGES THAT IT HAS READ AND UNDERSTANDS THIS AGREEMENT AND AGREES TO BE BOUND BY ITS TERMS. LICENSEE FURTHER AGREES THAT THIS AGREEMENT IS THE COMPLETE AND EXCLUSIVE STATEMENT OF THE AGREEMENT BETWEEN LICENSEE AND LICENSOR, AND SUPERCEDES ANY PROPOSAL OR PRIOR AGREEMENT, ORAL OR WRITTEN, AND ANY OTHER COMMUNICATIONS RELATING TO THE SUBJECT MATER OF THIS AGREEMENT.


Files to be included with your application

Files to be included with your application

Important note about installed version

This section of the documentation applies to the full purchased version only: the trial version of the component comes with an internal protection schema against fraudulent uses which will block most functionalities when the component is redistributed outside of the development machine where the trial version was originally installed through the provided setup program.

Files that you need to redistribute with your application depend upon the platform target:

· If compiling for "Any CPU"

- the x86 version of the the control's binary AwavanMms.OCX

- the x86 version of the multimedia engine WavMmsEng.DLL

- the x64 version of the the control's binary AwavanMms64.OCX

- the x64 version of the multimedia engine WavMmsEng64.DLL

· If compiling specifically for x86

- the x86 version of the the control's binary AwavanMms.OCX

- the x86 version of the multimedia engine WavMmsEng.DLL

· If compiling specifically for x64

- the x64 version of the the control's binary AwavanMms64.OCX

- the x64 version of the multimedia engine WavMmsEng64.DLL

You can find redistributable files mentioned above inside the folder in which you installed Active Waveform Analyzer (default "C:\Program Files\Active Waveform Analyzer\Redist").

Important note about the folder chosen for installing our files

In order to avoid the "DLL Hell" problem, it's strongly recommended that you install the mentioned files into the same folder in which you will install the EXE of your container application on the target system and not inside the Windows\System32 or Windows\SysWOW64 folders.

In order for the control to register and work correctly on the target system, the following is a summary of the Microsoft Windows libraries that must be available on the target system:

WINMM.DLL

MSACM32.DLL

OLEAUT32.DLL

OLEPRO32.DLL

DirectX version 9.0c or higher should be available as well. DirectX redistributable modules can be obtained from the Microsoft web site.

Special notes

· If you are using the Microsoft Visual Studio "Package and Deployment Wizard" for packaging your applications, be sure that Oleaut32.dll and Olepro32.dll libraries are taken from your Windows\System32 directory: by default this wizard makes use of an outdated version of the mentioned libraries that could cause failures while registering any ActiveX control on the target system.


Product history

Product history

Version 1.2.0.0

New features

· Added the possibility to limit the waveform analysis of a sound file to a given range
· Added the possibility to set an offset expressed in milliseconds to the timing labels displayed on the time rulers

New methods

AnalyzeSoundFromFileRangeSet

SettingsRulersTimeOffsetSet

Version 1.1.0.0

New features

· When dealing with audio or video formats not supported natively, added the possibility to perform the waveform analysis during the audio extraction phase.

New methods

EnableAutoWaveAnalysisOnLoad


How to contact MultiMedia Soft

How to contact MultiMedia Soft

Apart from the quality of our products, one of our strongest points is a superior customer support: we always answer technical questions, sent through our Contact us web page, within the first 24 hours also on Saturday and on Sunday.

Through our web site

Contact page

http://www.multimediasoft.com/contact/

Forum

http://www.multimediasoft.com/forum

Through Postal address:

MultiMedia Soft

Strada Pelizzina 21

10081 Castellamonte (TO)

Italy

Through Telephone:

+39 0124 640005 Number provided for Italian speaking only: in order to avoid language misunderstandings, no phone support is available in languages different from Italian so, in order to submit your questions in English, please, fill the form provided on our contact page or, in alternative, use our forum.

Through Fax:

+39 0124 233112758

+39 02 700433430


How to report bugs to our technical support

How to report bugs to our technical support

If you should experience problems using the control, you are encouraged to contact our customer support specifying the following topics:

· Operating system (Windows XP, Vista, 7, etc.) and version; if using a Windows NT based system (like Windows 2000 and Windows XP), specify which Service Pack has been installed.
· Name, Release and Version of the programming environment (e.g. Visual Basic 6 SP5 or Visual Studio.NET 2003).
· Eventually, create a log file generated by the Microsoft's DxDiag.exe application and send it to us for evaluation.
· If possible, prepare a little project that reproduces the problem on your system: being able to reproduce the problem on our systems will speed up the problem solution.
· An accurate description of the steps to reproduce the issue.

We will try to solve the problem as soon as possible and, if required, we will inform you when the fixed control will be available.


Tutorials

Tutorials

How to install the control on your development PC

How to add the control to your projects

Adding the control to a Visual Basic 6 project

Adding the control to a Visual C++ 6 project

Adding the control to a Visual Studio.NET project

How to use the control in your projects

How to use the control inside a web page

How to configure the waveform analyzer through the visual editor

How to add graphic items to the Waveform Analyzer

How to perform custom graphic rendering over the control's surface

How to scroll the sound's waveform during playback

How to manage Unicode characters in filenames and tags

How to use Mnemonic Constants


How to install the control on your development PC

How to install the control on your development PC

This product has been developed for use with programming environments that support ActiveX custom controls: each development environment uses a different procedure in order to add an ActiveX control to a project so, if you need to add this control to your project, refer to the development environment documentation.

In order to install this product on your system, follow the steps listed below:

· Be sure to exit any application currently running on your system
· Launch the downloaded awavan_f.exe (awavan_t.exe for the trial version) file and follow the contained instructions.
· Once the setup package has installed all the needed files, it will automatically register our ActiveX control inside the system registry of your development PC
· From now on you will be able to add the control to your projects. For details about inserting the control into a project, take a look to the Adding the control to your projects section.


How to add the control to your projects

How to add the control to your projects

Each development environment has its own procedure in order to add an ActiveX control to the project under development. Here follows a small summary of procedures needed in order to add our control to projects developed using some of the most diffused Microsoft environments.

Adding the control to a Visual Basic 6 project

Adding the control to a MFC project developed through Visual Studio 6

Adding the control to a MFC project developed through Visual Studio 2005 or higher

Although the component could be also used without problems inside projects developed through Visual C# or Visual Basic.NET, for these development environments we would strongly suggest using our .NET alternative named "Audio Waveform Analyzer for .NET".


Adding the control to a Visual Basic 6 project

Adding the control to a Visual Basic 6 project

Find below required steps:

· Open the project you are working on
· Choose the "Project/Components" menu item
· From the "Controls" tab, check the "Active Waveform Analyzer ActiveX Control module" element as seen in the screenshot below:

· Once the control has been inserted inside the project, the following icon should appear inside your development environment toolbox

· You can now select the control icon inside the toolbox and drag it into the container form; the following drawing will appear on the form:

· Through the provided blue handles you can position and resize the control on the user interface allowing to establish the initial position and size that the control will assume at runtime.
· You can now start developing your code around the control as described inside the How to use the control in your projects section


Adding the control to a MFC project developed through Visual Studio 6

Adding the control to a MFC project developed through Visual Studio 6

 Return to chapter overview

Find below required steps:

· Open the project you are working on
· Choose the "Project/Add To Project/Components and Controls..." menu item
· From the "Components and Controls Gallery" select the "Registered ActiveX controls" folder
· From the "Components and Controls Gallery", select the "Active Waveform Analyzer Control" element as seen in the screenshot below and press the Insert button

· Press the "OK" button on the message box and dialog box that will appear.

· Now press the "Close" button of the "Components and Controls Gallery" that will take you again to your project working area
· Once the control has been inserted inside the project, the following icon should appear inside your development environment toolbox

· Now you can select the control icon inside the toolbox and drag it into the dialog box under editing; the following icon will appear on the dialog box (note that this icon will be invisible at runtime)

· You can now start developing your code around the control as described inside the How to use the control in your projects section.


Adding the control to a MFC project developed through Visual Studio 2003 or higher

Adding the control to a MFC project developed through Visual Studio 2005 or higher

 Return to chapter overview

Find below required steps:

· Open the project you are working on
· Open the dialog box that will host the control
· Right click the dialog box area and select "Insert ActiveX control..." from the context menu

· Within the installed ActiveX components find the component named "Active Waveform Analyzer Control" as displayed below

· Pressing the "OK" button will bring you again to your project working area and the representation of the ActiveX control will appear as seen below

· After the insertion you can resize and reposition the control by dragging its handles as needed
· You can now start developing your code around the control as described inside the How to use the control in your projects section

Important note about wrappers usage

The use of ActiveX controls within projects developed using Visual C++ 2003 (or higher) and MFC creates particular issues users must be aware of: as seen for Visual C++ 6.0, ActiveX controls require wrapper classes in order to be used in this environment.

Usually these wrapper classes should be generated automatically by the development environment through a dedicated wizard but, due to some unclear policy inside the newer versions of Visual Studio, wrapper classes will result incomplete when dealing with ActiveX controls that, in order to maintain backward compatibility, alternates identifiers of properties and methods. For this reason our control comes with its already generated C++ wrapper classes, installed by the setup package inside the "wrappers\cpp.net" directory (by default the complete path should be "C:\Program Files\Active Waveform Analyzer\wrappers\cpp.net").

This issue implies to perform some manual action when creating a variable associated to the control:

· Insert an instance of Active Waveform Analyzer, as specified above, inside the container dialog box
· Copy the following wrapper files into your project directory:

ActiveWaveformAnalyzer.cpp and ActiveWaveformAnalyzer.h

WaveformScrollerWan.cpp and WaveformScrollerWan.h

· Add the just mentioned wrapper files to your project.
· Open the header file of the dialog box class (supposing that our application's name will be TestApp the header file will be named TestAppDlg.h)
· Insert the following includes:

#include "ActiveWaveformAnalyzer.h"

#include "WaveformScrollerWan.h"

· Inside the CTestAppDlg class, declare a variable of type CActiveWaveformAnalyzer that will implement the control in your code:

CActiveWaveformAnalyzer      m_waveform;

· Open the source file of the dialog class TestAppDlg.cpp
· Search the CTestAppDlg::DoDataExchange override function and insert the following code (here we assume that the development environment will assign the identifier IDC_ACTIVEWAVEFORMANCTRL1 to the control):

DDX_Control(pDX, IDC_ACTIVEWAVEFORMANCTRL1, m_waveform);

· Just for testing purposes, search the CTestAppDlg::OnInitDialog handler function and insert the following code:

m_waveform.InitWaveformAnalyzer ((long) GetSafeHwnd ());

m_waveform.AboutBox ();

· Now compile and run the project: you should see the control's about box displayed before showing the main dialog box of the application.


How to use the control in your projects

How to use the control in your projects

First of all let us say that if this guide should not be clear to you, feel free to contact our support team for any doubt or curiosity you may have: we usually answer all of our customers questions in less than 24 hours. Note that the purpose of this guide is to give a taste of the main features available inside Active Waveform Analyzer.

As an integration to this guide some example of use of this component, in Visual Basic 6 and Visual C++ languages, can be found inside the "Samples" folder: if during the setup phase you left the installation directory to its default, you will find them inside "C:\Program Files\Active Waveform Analyzer\Samples".

Behaviour and look of the component can be determined in two situations:

· Design-time
· Runtime

DESIGN-TIME:

The first step is to add the control to your project: see the How to add the control to your projects section for details.

Once inserted, at design-time the control will appear in its default state.

In order to change its appearance and behavior right-click it with the mouse and select the Properties item from the context menu. The control's property sheet will appear as follows.

With newer versions of Visual Studio 2003 and higher, this property page can be accessed by clicking the icon marked on the screenshot below:

From this property sheet you can choose from the following options:

· Edit the analyzer's properties through the visual editor.
· Refresh the control.
· Load settings from a previously saved XML file
· Save settings into a XML file

Pressing the Edit settings... button will launch the Waveform Analyzer Visual Editor application that allows changing most of the waveform analyzer settings and check how it would behave during an eventual playback session:

For details about the usage of the Waveform Analyzer Visual Editor application, see the "How to configure the waveform analyzer through the visual editor" tutorial.

RUN-TIME:

The control's appearance and behavior can also be modified at run-time. For those using the product within the C++ environment, the download package includes a module named WavMmsEngDef.h that will help you with mnemonic constants required by the control. This module can be found inside the Include directory created by the setup package (the default is C:\Program files\Active Waveform Analyzer\include).

Before starting doing anything else, the component needs to be initialized: for this purpose it's mandatory a call to the InitWaveformAnalyzer method; the best place to call this initialization method is usually the container form loading function: for example, when using Visual Basic 6, it will be the Form_Load subroutine while, when using a MGC dialog based project, it will be the OnInitDialog function which manages the WM_INITDIALOG message. The main purpose of calling the InitWaveformAnalyzer method is to synchronize the component with its container form.

After having initialized the component, we can perform sound's analysis through different ways:

· on sound files and audio tracks of video clips through AnalyzeSoundFromFile method
· on RAW audio files through the AnalyzeSoundFromFileRaw method
· on PCM audio streams provided by an external entity through the sequence of ExternalSoundAnalysisStart, ExternalSoundAnalysisPushData and ExternalSoundAnalysisStop methods: in this case the waveform analysis will occur when the ExternalSoundAnalysisStop method is invoked.

When using the AnalyzeSoundFromFile and AnalyzeSoundFromFileRaw methods, by default the full audio file is analyzed: in case you should only need to analyze a specific portion of the audio file, you could limit the analyzed range through the AnalyzeSoundFromFileRangeSet method.

In all cases, analysis can be more or less accurate depending upon the resolution set into the nResolution field of the WANALYZER_GENERAL_SETTINGS data structure: higher resolutions will allow a better quality because more peaks will be detected: as a side effect, higher resolutions will require more memory. When the results of an analysis are no more needed, the involved memory can be released through a call to the FreeMemory method. The analysis can be aborted at any time through a call to the AnalyzeAbort method.

After starting sound analysis, the control will allow the container application to stay up-to-date about the analysis advancement through the following events:

· WaveAnalysisStart: fired when the sound's analysis begins.
· WaveAnalysisPerc: fired several times during the analysis in order to inform the container application about the percentage of advancement.
· WaveAnalysisDone: fired when the sound's analysis is completed

After completing the waveform analysis, you can request the level, expressed in percentage, of the highest and of the lowest peaks available inside a certain range of the waveform through the GetMinMaxPeakLevelsForRange method.

At this point it's possible creating a graphical representation of analyzed sounds in one of the following ways:

Mode 1: Dynamic waveform visualization

Mode 2: Creation of bitmaps in various graphic formats

Mode 3: Rendering on a graphic Device Context (HDC)

Mode 1: Dynamic waveform visualization

By default the Waveform Analyzer user interface will appear as in the picture below where the top waveform represents the left channel of a stereo sound while the bottom waveform represents the right channel of a stereo sound (sounds in mono are rendered using one single waveform):

Once the waveform analysis has been performed, you can immediately display the full waveform on the visible area of the analyzer through a call to the SetDisplayRange method by passing 0 and -1 respectively to the nBeginPosInMs and nEndPosInMs parameters.

In case the waveform analyzer should be used in conjunction with a multimedia player implemented through a component like our "Active DJ Studio" ActiveX control or through third-party libraries like Leadtools Multimedia SDK, BASS, FMOD or through Microsoft's frameworks like Media Foundation and DirectShow, the component allows displaying the current playback position through a vertical line whose position can be modified in real-time through the PlaybackPositionSet method: usually the best place to insert this call is a timer routine with a very small delay (usually a value between 50 and 100 milliseconds) which obtains the current playback position from the multimedia component and passes it to the waveform analyzer component.

The Waveform Analyzer can be:

· refreshed through the RefreshDisplay method
· scrolled through the ScrollDisplay method: scrolling can be also performed panning the horizontal scrollbars with the mouse.
· it's also possible replacing the standard cursors, used for scrolling and resizing, operations through the SetTrackerCursors method

The graphical rendering of this control is fully customizable and you can modify colors used to render the various elements and hide/show all of the elements surrounding the waveform representation; for this purpose you can gain access to the various settings through the following set of data structures using the provided methods:

· general settings are managed through the WANALYZER_GENERAL_SETTINGS data structure accessible through the combination of the SettingsGeneralGet and SettingsGeneralSet methods.
· rulers rendering settings are managed through the WANALYZER_RULERS_SETTINGS data structure accessible through the combination of the SettingsRulersGet and SettingsRulersSet methods.
· scrollbars rendering settings are managed through the WANALYZER_SCROLLBARS_SETTINGS data structure accessible through the combination of the SettingsScrollbarsGet and SettingsScrollbarsSet methods.
· waveform rendering settings are managed through the WANALYZER_WAVEFORM_SETTINGS data structure accessible through the combination of the SettingsWaveGet and SettingsWaveSet methods.

When using the control inside a web page, where managing data structures is not an easy task, you can access single parameters of the various data structures using the following methods:

· SettingsGeneralParamGet and SettingsGeneralParamSet for the WANALYZER_GENERAL_SETTINGS data structure.
· SettingsRulersParamGet and SettingsRulersParamSet for the WANALYZER_RULERS_SETTINGS data structure.
· SettingsScrollbarsParamGet and SettingsScrollbarsParamSet for the WANALYZER_SCROLLBARS_SETTINGS data structure.
· SettingsWaveParamGet and SettingsWaveParamSet for the WANALYZER_WAVEFORM_SETTINGS data structure.

The Waveform Analyzer allows selecting/deselecting portions of the displayed waveform in two different ways:

· through code using the SetSelection method.
· through mouse acting directly on the waveform area: simply press the left button, drag the mouse position keeping the left button pressed and then release the left button: the selected area will appear with its colors inverted and with two tracker handles that will allow further manual resizing of the selected range; this selection can be also moved performing a mouse panning. After these manual operations the control can obtain the selected area through the GetSelection method. During a playback session the mouse interaction is automatically disabled and mouse clicks will be ignored.

The Waveform Analyzer allows zooming the displayed waveform in two different ways:

· through code using one of the following methods: SetDisplayRange, ZoomIn, ZoomOut, ZoomToFullSound, ZoomToSelection. After zooming in and out, you can obtain the current sound's range displayed on the Waveform Analyzer calling the GetDisplayRange method and to obtain the length of this range in milliseconds and pixels using the GetDisplayWidth method.
· through mouse acting directly on the tracker handles of one of the available horizontal scrollbars as seen on the picture below:

Whenever a change occurs on the user interface, the container application is notified through one of the following events:

· WaveAnalyzerSelectionChange: this event occurs when a selection/deselection is performed
· WaveAnalyzerDisplayRangeChange: this event occurs when a new range within the sound is displayed
· WaveAnalyzerDisplayWidthChange: this event occurs when the control is resized horizontally

In order to allow management of mouse interaction, you can catch the WaveAnalyzerMouseNotification event which reports the exact position where the mouse was pressed on the waveform: accurate positioning is guaranteed also when the waveform is zoomed. Mouse interaction can be enabled/disabled through the MouseSelectionEnable method. During a playback session the mouse interaction is automatically disabled and an eventual call to this method will be ignored.

Each graphical element composing the Waveform Analyzer visualization is referenced by a specific rectangle on the screen: coordinates and dimensions of this rectangle, expressed in pixels, can be obtained through the GetRectangle method.

Each time the graphical rendering of the Waveform Analyzer is completed, the container application receives a WaveAnalyzerPaintDone event: this event will pass as parameter the HWND of the Waveform Analyzer window, allowing to perform further custom graphic rendering on the Waveform Analyzer surface; for this purpose you can obtain the handle to the device context (HDC) of the Waveform Analyzer through the GetDC Windows API.

The Waveform Analyzer automatically manages two vertical lines, one for displaying the current position during a playback session and another one for displaying a position, selected through the mouse, within the loaded sound: the look of these two lines can be modified through the WANALYZER_GENERAL_SETTINGS data structure mentioned before.

The waveform analyzer allows adding further graphical items like vertical lines, horizontal lines and wave ranges: for details about graphic items management you can refer to the How to add graphic items to the Waveform analyzer tutorial.

Mode 2: Creation of bitmaps in various graphic formats

After catching the WaveAnalysisDone event, it will be possible requesting to the control the creation of the waveform's bitmap through a call to the BitmapViewSaveToFile and BitmapViewSaveToMemory methods. It's important to note that the WaveAnalysisDone event will report the exact number of peaks detected inside the loaded sound and the exact duration in milliseconds of each peak. When generating the bitmap for the full sound's waveform, the reported number of peaks will be exactly equal to the width in pixels of the bitmap. In case you should create a view of a given sound's range, you could obtain the number of pixels needed to display the waveform's view through a call to the BitmapViewGetWidth method.

The generated waveform's bitmap will be rendered using colors set into the colorWaveLinePeak, colorWaveLineCenter and colorWaveBackground fields of the WANALYZER_WAVEFORM_SETTINGS data structure.

Below you can see five bitmaps generated using the same sound (whose duration is around 2.4 seconds length) but with five different resolutions (just for your information the song used for generating these bitmaps is available on this link); all these bitmaps have been created using the same height of 100 pixels:

Resolution set into the nResolution property | Generated bitmap
WAVEANALYZER_RES_MAXIMUM |
WAVEANALYZER_RES_VERY_HIGH |
WAVEANALYZER_RES_HIGH |
WAVEANALYZER_RES_MIDDLE |
WAVEANALYZER_RES_LOW |

As mentioned before, you can also generate a "view" of a defined portion of the loaded sound: on the bitmap below you can see the original song in its full length (with WAVEFORM_RES_MAXIMUM resolution)

and below you can see the view of the same song for the range between 500 and 1500 milliseconds

On the samples above we have used a very small song limited to 2.4 seconds: in case you should be in need of displaying the full waveform of a longer song on a space much smaller than the total number of required pixels, the BitmapViewSaveToFile and BitmapViewSaveToMemory methods will shrink the waveform in order to fit exactly inside the available space; in the example below you can see a 3 minutes song fitting inside a 455 pixels wide bitmap: the original full length bitmap, using the WAVEFORM_RES_MAXIMUM resolution, would require a width of 243,683 pixels.

VERY IMPORTANT: When using high resolutions and big sound files, keep count that the Windows operating system has limits on the size of bitmaps creation; this means that it would be better avoiding the creation of very large bitmaps: in this case it would be a better approach splitting the total song's bitmap into several smaller bitmaps, for example creating bitmaps whose width in pixels doesn't exceed the current screen width.

Mode 3: Rendering on a graphic Device Context (HDC)

After catching the WaveAnalysisDone event, it will be also possible rendering the waveform directly inside a graphical device context (through its handle or HDC) using the BitmapViewDrawToHdc method; this may be quite useful if you should need to perform real-time rendering of the waveform on the screen. Although this could be also used for creating a scrolling waveform during playback, we suggest checking the How to scroll the sound's waveform during playback tutorial for further details about managing a scrolling waveform.


How to use the control inside a web page

How to use the control inside a web page

Active Waveform Analyzer is marked as "safe for scripting" and "safe for initialization" so it can be inserted and used from within a HTML web page. As you may know, the technique for adding ActiveX controls inside HTML code is the use of the <OBJECT> tag as displayed on the following HTML code:

<object id="ActiveWaveformAnalyzer1"

classid="clsid:E8FB6734-ED06-4835-A6BF-C1DC90EF0F3C"

width="500" height="200">

</object>

Obviously the code above will not work if the control is not already installed and registered on the client machine; in order to download, install and register the control on a client machine, you will need to modify the code in the following way (observe text in red color):

<object id="ActiveWaveformAnalyzer1"

classid="clsid:E8FB6734-ED06-4835-A6BF-C1DC90EF0F3C"

codebase="http://yourserver/awavanmms.cab"

width="500" height="200">

</object>

the "codebase" attribute is used in order to determinate the remote location of the control's CAB file which contains the AwavanMms.ocx control and the needed dependencies: this CAB file (digitally signed) is not included with the original installation package and can be requested by registered customer contacting our support team.

Through the "codebase" attribute it's also possible managing control's versioning: in this way, in case the client PC should already contain an outdated version of the control, the browser could request to re-download and re-install the CAB file containing the latest version of the control. Versioning can be managed modifying the OBJECT tag like this (observe text in red color):

<object id="ActiveWaveformAnalyzer1"

classid="clsid:E8FB6734-ED06-4835-A6BF-C1DC90EF0F3C"

codebase="http://yourserver/awavanmms.cab#Version=1,0,0,0"

width="500" height="200">

</object>

It's important to note that the AwavanMms.ocx control requires a runtime license so, in order to let it work inside a web page, you will have to embed the LPK license file inside the HTML code as described below:

<OBJECT CLASSID="clsid:5220CB21-C88D-11cf-B347-00AA00A28331">

 <PARAM NAME="LPKPath" VALUE="awavanmms.lpk">

</OBJECT>

it's mandatory that the <OBJECT> tag above, containing the LPK file, must be inserted inside the HTML code BEFORE any other <OBJECT> tag.

Due to the fact that only one LPK object can be embedded inside the HTML code, if you should need using more than one ActiveX control inside your page, you will have to create a LPK file including all of them. Details about creation of LPK files can be found on the Microsoft web site. If you are a registered user and if you should need assistance in creating the LPK file, feel free to contact our support team.

How to call control's methods

Web pages can interact with the control through scripting: supposing that you have an initialization routine for your web page, it should look like the following one:

<script language="javascript">

function Init ()

{

try

{

  // initialize the control

  ActiveWaveformAnalyzer1.InitWaveformAnalyzer (0);

}

catch (e)

{

  // probably the control is still not installed: this function will be called again

  // after the control installation so we can exit right now

  return;

}

}

</script>

The try/catch block is quite useful in order to avoid annoying warning messages caused by the script being executed before the control is fully downloaded/installed: for this reason, avoid inserting calls to the "alert" function inside the catch block because it could give you misleading messages.

At this point you could customize the look of the waverform analyzer in a way like this:

<script language="javascript">

function Init ()

{

try

{

  // initialize the control

  ActiveWaveformAnalyzer1.InitWaveformAnalyzer (0);

  // modify some of the available settings

  ActiveWaveformAnalyzer1.SettingsGeneralParamSet (1, "3");       // nResolution = WAVEANALYZER_RES_MIDDLE

  ActiveWaveformAnalyzer1.SettingsRulersParamSet (9, "#336633");  // colorRulersBackground

  ActiveWaveformAnalyzer1.SettingsRulersParamSet (7, "false");    // bVisibleBottom

  ActiveWaveformAnalyzer1.SettingsScrollbarsParamSet (4, "false");// bVisibleBottom

  ActiveWaveformAnalyzer1.SettingsWaveParamSet (0, "3");          // nStereoVisualizationMode = STEREO_MODE_CHANNELS_MIXED

}

catch (e)

{

  // probably the control is still not installed: this function will be called again

  // after the control installation so we can exit right now

  return;

}

}

</script>

How to handle control's events

During an analysis session, you could have the need to handle events fired by the control: catching events is quite straight-forward and, in JavaScript, you can use a way like this:

<script FOR="ActiveWaveformAnalyzer1" EVENT="WaveAnalysisStart ()">

divAnalyzerStatus.innerText = "Analyzing sound...";

</script>

<script FOR="ActiveWaveformAnalyzer1" EVENT="WaveAnalysisPerc (nPercentage)">

divAnalyzerStatus.innerText = "Analyzing sound... " + nPercentage + "%";

</script>

<script FOR="ActiveWaveformAnalyzer1" EVENT="WaveAnalysisDone (nTotalPeaksDetected, fPeakDurationInMs, nMaxPeakLeft, nMaxPeakRight)">

divAnalyzerStatus.innerText = "Analyzer in idle state";

setTimeout("DisplaySoundWaveform()", 100);

</script>

The code above will catch the WaveAnalysisStart, WaveAnalysisPerc and WaveAnalysisDone events in order to give a feedback about the advancement of an analysis session started through a call to the AnalyzeSoundFromFile method.

f you want to see a sample web page with some real coding and graphical rendering, you can follow this link to our test page.


How to configure the waveform analyzer through the visual editor

How to configure the waveform analyzer through the visual editor

 Return to chapter overview

Inside the How to use the control in your projects tutorial we have seen how to edit the control at Design-time; when editing a control at Design-time, you must take care of applying all of the settings that will influence the control behaviour at Runtime: for example, our waveform analyzer can change its colors, the font used to display the horizontal and vertical rulers, the rendering of scrollbars and so on: usually, in order to see these changes, you will have to compile and run your projects in order to see if settings modified at Design-time are correct for your needs: with our component we have found the right solution to let you verify, at Design-time, the behaviour that the control will have at Runtime: the solution is the integration of this component with our Waveform Analyzer Visual Editor application.

Waveform Analyzer Visual Editor is a WYSIWYG application and, as you can see on the image above, its user interface is very friendly and doesn't require any specific skill.

On the upper half of the user interface is displayed an empty instance of the waveform analyzer having the same dimensions set at design-time inside the development environment; on the lower half of the user interface there is a property sheet with various property pages, each addressing a set of specific settings applied to the waveform analyzer:

· The "General settings" property page, visible on the screenshot above, covers settings available inside the WANALYZER_GENERAL_SETTINGS data structure which are usually applied at runtime through the SettingsGeneralSet method.

· The "Rulers settings" property page covers settings available inside the WANALYZER_RULERS_SETTINGS data structure which are usually applied at runtime through the SettingsRulersSet method.

· The "Scrollbars settings" property page covers settings available inside the WANALYZER_SCROLLBARS_SETTINGS data structure which are usually applied at runtime through the SettingsScrollbarsSet method.

· The "Waveform settings" property page covers settings available inside the WANALYZER_WAVEFORM_SETTINGS data structure which are usually applied at runtime through the SettingsWaveSet method.

In all of the property pages above, modifications will take effect by clicking the "Apply changes" button.

As mentioned above, the waveform analyzer will initially result empty because no media file is loaded by default: in order to allow simulating the real behaviour in presence of a loaded media file, the "Media file playback" property page allows loading and analyzing the waveform of a media file, with the possibility to start playback and observe how the control will behave on the user interface of your application.

Due to the fact that the Waveform Analyzer control doesn't come with media playback support, loading of the media file for playback purposes is performed through the usage of DirectShow so, in case the loaded media file should contain a video track and the system should have the appropriate DirectShow codecs installed, it will be rendered as well inside the provided window.

At this point It must be remarked that this application can work in 2 modes:

· From the IDE of the development environment
· As a stand alone application

From the IDE of the development environment

When invoked from the IDE at Design-time, the user interface will be exactly as seen on the screenshots displayed above: in case the control under editing should have been already modified through a previously editing session, current settings would be automatically visible.

When all of the needed changes have been applied, you can transfer the updated settings to the control under editing inside the development environment by selecting the "Waveform analyzer/Exit and save" menu item or by closing the visual editor through the "X" button on the caption bar as seen inside the screenshot below:

:

During the usage of the visual editor, the following menu items could be selected:

Menu item | Submenu item | Usage | Runtime equivalent method
Waveform Analyzer |  |  |
 | Reset settings | Resets all of the waveform analyzer settings | SettingsReset
 | Load settings... | Loads waveform analyzer settings from a previously saved XML configuration file | SettingsLoad or SettingsLoadFromMemory
 | Save settings... | Saves current settings of the waveform analyzer under editing into a XML configuration file | SettingsSave
 | Load test media file... | Loads a media file for testing purposes | None
 | Close test media file | Closes a loaded test media file | None
 | Exit and save | Closes the visual editor and passes current settings of the waveform analyzer to the control under editing inside the IDE. | None
 | Exit without saving | Closes the visual editor and discards any eventual modification of settings applied to the waveform analyzer. | None
Edit |  |  |
 | Select all | When a media file is loaded, selects the full waveform | SetSelection with parameters set to BOOL_TRUE,0 and -1
 | Remove selection | Removes an existing selection | SetSelection with parameters set to BOOL_FALSE,0 and -1
Zoom |  |  |
 | Zoom to selection | If a selection is available, changes the visible range by zooming into the selection | ZoomToSelection
 | Zoom to full waveform | If the visible range doesn't cover the full waveform, zooms the visible range out in order to display the full waveform representation into the visible area | ZoomToFullSound
 | Zoom in | Zooms in the waveform representation allowing to display a smaller sound range into the visible area | ZoomIn
 | Zoom out | Zooms out the waveform representation allowing to display a larger sound range into the visible area | ZoomOut

As a stand alone application

When the visual editor application is launched as a stand alone application, meaning that it's not launched from the IDE of the development environment, it allows doing some more operation which would not make much sense at design-time.

For example you may need to load a specific media file and mark certain points of the media file by adding some graphic item, for example one or more vertical and/or horizontal lines or put in evidence a specific portion of the loaded media file by changing the colors of a certain range of the waveform. In this situation, after having loaded the media file, the application allows adding graphic items and save them inside XML files that could be stored inside a database and retrieved at runtime in order to display them on the waveform analyzer when the same media file is analyzed.

For details about the usage of graphic items at runtime through code, see the How to add graphic items to the Waveform Analyzer tutorial.

As you can see on the screenshot below, the application's menu adds one further menu item named "Graphic items":

During the usage of the visual editor, the following menu items could be selected:

Menu item | Submenu item | Usage | Runtime equivalent method
Waveform Analyzer |  |  |
 | Reset settings | Resets all of the waveform analyzer settings | SettingsReset
 | Load settings... | Loads waveform analyzer settings from a previously saved XML configuration file | SettingsLoad or SettingsLoadFromMemory
 | Save settings... | Saves current settings of the waveform analyzer under editing into a XML configuration file | SettingsSave
 | Load test media file... | Loads a media file for testing purposes | None
 | Close test media file | Closes a loaded test media file | None
 | Exit | Closes the visual editor. | None
Edit |  |  |
 | Select all | When a media file is loaded, selects the full waveform | SetSelection with parameters set to BOOL_TRUE,0 and -1
 | Remove selection | Removes an existing selection | SetSelection with parameters set to BOOL_FALSE,0 and -1
Graphic items |  |  |
 | Add Vertical line... | Opens a dialog box which allows adding a new vertical line to the displayed waveform at a given position and with custom parameters. | GraphicItemVerticalLineAdd
 | Add Horizontal line... | Opens a dialog box which allows adding a new horizontal line to the displayed waveform at given positions and with custom parameters. | GraphicItemHorizontalLineAdd
 | Add Wave range... | Opens a dialog box which allows adding a new waveform range to the displayed waveform at given positions and with custom parameters. | GraphicItemWaveRangeAdd
 | Load from file... | Allows loading graphic items previously stored inside a XML file | GraphicItemsLoad and GraphicItemsLoadFromMemory
 | Save to file... | Allows saving currently displayed graphic items inside a XML file for later usage | GraphicItemsSave
 | Show vertical lines | Shows/hides eventual vertical lines added to the waveform | GraphicItemsTypeShow with nType parameter set to GRAPHIC_ITEM_VERTICAL_LINE
 | Show horizontal lines | Shows/hides eventual horizontal lines added to the waveform | GraphicItemsTypeShow with nType parameter set to GRAPHIC_ITEM_HORIZONTAL_LINE
 | Show wave ranges | Shows/hides eventual wave ranges added to the waveform | GraphicItemsTypeShow with nType parameter set to GRAPHIC_ITEM_WAVE_RANGE
 | Remove all | Removes all of the added graphic items | GraphicItemRemove with nUniqueId parameter set to -1
Zoom |  |  |
 | Zoom to selection | If a selection is available, changes the visible range by zooming into the selection | ZoomToSelection
 | Zoom to full waveform | If the visible range doesn't cover the full waveform, zooms the visible range out in order to display the full waveform representation into the visible area | ZoomToFullSound
 | Zoom in | Zooms in the waveform representation allowing to display a smaller sound range into the visible area | ZoomIn
 | Zoom out | Zooms out the waveform representation allowing to display a larger sound range into the visible area | ZoomOut

On the screenshot below you can see a waveform analyzer displaying a simple stereo waveform

while on the screenshot below you can see the same simple waveform with a set of graphic items added manually or by loading a previously saved XML file:

as you can see, several graphic items have been added and allow marking specific positions on the waveform. Once added to the waveform analyzer, graphic items can still be modified, for example you may need to modify the position or change some parameter like colors or drawing mode. This can be done by positioning the mouse over the graphic item and by clicking the right mouse button in order to display the context menu as seen on the screenshot below:

Items of the mentioned context menu:

Context menu item | Usage | Runtime equivalent method
Change graphic item settings... | Opens a dialog box which allows modifying settings of the selected item | GraphicItemVerticalLineParamsSet for vertical lines, GraphicItemHorizontalLineParamsSet for horizontal lines and GraphicItemWaveRangeParamsSet for wave ranges
Set buddy picture... | Opens a dialog box which allows adding or modifying a buddy picture of the graphic item | A buddy picture can be added through the GraphicItemBuddyPictureSetFromFile, GraphicItemBuddyPictureSetFromMemory, GraphicItemBuddyPictureSetFromHandle methods and related parameters modified through the GraphicItemBuddyPictureParamsSet method
Remove buddy picture | Removes an eventual buddy picture | GraphicItemBuddyPictureSetFromFile with the strPathname parameter containing an empty string
Set buddy text... | Opens a dialog box which allows adding or modifying a buddy text of the graphic item | A buddy text can be added through the GraphicItemBuddyTextSet method and related parameters modified through the GraphicItemBuddyTextParamsSet method
Remove buddy text | Removes an eventual buddy text | GraphicItemBuddyTextSet with the strText parameter containing an empty string
Remove graphic item | Removes the graphic item from the waveform | GraphicItemRemove

Below you can see a yellow vertical line having both a buddy picture and a buddy text at different positions.

As mentioned before, after adding and modifying graphic items, the "Graphic items/Save to file..." menu item allows saving all of them inside a XML file for later usage at runtime or during another session of the visual editor launched in stand alone.


How to add graphic items to the Waveform Analyzer

How to add graphic items to the Waveform Analyzer

As seen inside the tutorial How to use the control in your projects, the waveform analyzer allows selecting through the mouse a specific position on the visible waveform range, visualized through a vertical line, and to display the current playback position through a second vertical line.

The waveform analyzer allows adding through code further custom graphic items:

· Vertical lines through the GraphicItemVerticalLineAdd method
· Horizontal lines through the GraphicItemHorizontalLineAdd method
· Wave ranges through the GraphicItemWaveRangeAdd method

On the screenshot below you can find a waveform with several graphic items inside, each having its own colors and positioning:

For each of these graphic items, through the mentioned methods you can define a friendly name, a description, the exact position expressed in milliseconds, the colors used for being drawn and some more specific parameter.

All of the methods mentioned above return a unique identification number that will be used by other methods to access settings of each graphic item at a later time; for example you may want to:

· obtain or change the friendly name through the GraphicItemNameGet and GraphicItemNameSet methods
· obtain or change the item's description through the GraphicItemDescriptionGet and GraphicItemDescriptionSet methods
· obtain or change the current position through the GraphicItemHorzPositionGet and GraphicItemHorzPositionSet methods
· hide or show items the visibility through the GraphicItemShow method or through the GraphicItemsTypeShow method
· remove items from the list of graphic items through the GraphicItemRemove method or through the GraphicItemsTypeRemove method

All of the graphic items added to the waveform analyzer can be saved into a disk file for later use through the GraphicItemsSave and reloaded when needed through the GraphicItemsLoad method.

Enumerating graphic items of a given type added to the waveform analyzer can be done using the GraphicItemsTypeCountGet method, the unique identification number of each graphic item can be obtained through the GraphicItemUniqueIdGet method; when knowing only the unique identification number, the respective type can be obtained through the GraphicItemTypeGet method.

Graphic items can be rendered with other "buddy" elements that may help giving a more specific visual meaning to each item:

· Buddy pictures through the GraphicItemBuddyPictureSetFromFile, GraphicItemBuddyPictureSetFromHandle or GraphicItemBuddyPictureSetFromMemory methods; the screenshot below shows a waveform containing a short conversation between two employees: with vertical lines and a couple of buddy pictures it's very immediate understanding the position where a specific employee starts speaking:

· Buddy texts through the GraphicItemBuddyTextSet; the screenshot below shows the same conversation with buddy texts in place of buddy pictures:

Each type of graphic item implements further methods for acting on their settings and may generate specific events; let's see them in detail:

· Vertical lines

Settings specific to vertical lines can be obtained through the GraphicItemVerticalLineParamsGet method and modified through the GraphicItemVerticalLineParamsSet method.

Vertical lines can be manually moved through the mouse; this action will generate the combination of the following events:

· WaveAnalyzerLineMoveBegin raised when the movement begins
· WaveAnalyzerLineMoving raised during the movement of the line: you could receive many of these events in order to be up to date with the current line position; this event is also generated when the line position is modified through the GraphicItemHorzPositionSet method
· WaveAnalyzerLineMoveEnd raised when the movement ends

During playback you can be notified that the position of a vertical line has been reached through the WaveAnalyzerLineReached event.

· Horizontal lines

Settings specific to horizontal lines can be obtained through the GraphicItemHorizontalLineParamsGet method and modified through the GraphicItemVerticalLineParamsSet method.

Horizontal lines can be manually moved horizontally through the mouse; this action will generate the combination of the following events:

· WaveAnalyzerHorzLineMoveBegin raised when the movement begins
· WaveAnalyzerHorzLineMoving raised during the movement of the line: you could receive many of these events in order to be up to date with the current line position; this event is also generated when the line position is modified through the GraphicItemHorzPositionSet method or through the GraphicItemVertPositionSet method.
· WaveAnalyzerHorzLineMoveEnd raised when the movement ends

During playback you can be notified that the start position of a horizontal line has been reached through the WaveAnalyzerHorzLineReached event and that the end position of the line has been leaved through the WaveAnalyzerHorzLineLeaved event.

· Wave ranges

Settings specific to horizontal lines can be obtained through the GraphicItemWaveRangeParamsGet method and modified through the GraphicItemWaveRangeParamsSet method.

During playback you can be notified that the start position of a wave range has been reached through the WaveAnalyzerWaveRangeReached event and that the end position of the wave range has been leaved through the WaveAnalyzerWaveRangeLeaved event.

· Buddy pictures

Settings specific to buddy pictures can be obtained through the GraphicItemBuddyPictureParamsGet method and modified through the GraphicItemBuddyPictureParamsSet method.

A memory copy of the buddy picture, accessible through a HBITMAP, can be obtained through the GraphicItemBuddyPictureGet method.

· Buddy texts

Settings specific to buddy texts can be obtained through the GraphicItemBuddyTextParamsGet method and modified through the GraphicItemBuddyTextParamsSet method.

The current text string and the font used to render it on the screen can be retrieved through the GraphicItemBuddyTextGet method.

Samples of usage of graphic items applied to the waveform analyzer in Visual C# and Visual Basic.NET can be found inside the following samples installed with the product's setup package:

- WaveformAnalyzer


How to perform custom graphic rendering over the control's surface

How to perform custom graphic rendering over the control's surface

 Return to chapter overview

Although graphic features and customization possibilities should be already quite rich, at runtime you may have the need to add your own custom graphic rendering over the control's surface; this can be done in two ways:

· by catching the WaveAnalyzerPaintDone event and by using the handle to the drawing device context passed as a parameter to the event management routine: this event is generated as soon as the rendering of the control has been completed; using this technique is generally faster but, due to the fact that the passed device context is the screen device context, it could cause some flicker.
· by using the SetCustomPaintFunction method and providing your own drawing functionalities: this technique could be a little bit slower because the rendering is performed using double-buffering but the final result will be certainly better because it will be completely flicker free.

It's up to you deciding which of these techniques will better fit your needs.

Note that you have the possibility to use both of them at the same time but it's important to remember that the function provided through the call to the SetCustomPaintFunction method will be called before generating the WaveAnalyzerPaintDone event.

Let's see a sample that demonstrates how to paint a flicker free red ellipse over the button surface:

Visual Basic example

Inside a BAS module, add the following declarations that will allow accessing the Windows GDI primitives:

Public Declare Function SelectObject Lib "gdi32" (ByVal hDC As Long, ByVal hObject As Long) As Long

Public Declare Function Ellipse Lib "gdi32" (ByVal hDC As Long, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long

Public Declare Function DeleteObject Lib "gdi32" (ByVal hObject&) As Long

Public Declare Function CreateSolidBrush Lib "gdi32" (ByVal crColor As Long) As Long

Inside the same BAS module add the following subroutine that will perform our custom rendering:

Sub MyPaintFunction(ByVal hDC As Long)

 Dim brushColor As Long

 Dim brushOld As Long

 brushColor = CreateSolidBrush(RGB(255, 0, 0))

 brushOld = SelectObject(hDC, brushColor)

 Ellipse hDC, 10, 10, 50, 50

 SelectObject hDC, brushOld

 DeleteObject brushColor

End Sub

Inside the Form_Load subroutine, supposing that you have instanced a member variable ActiveWaveformAnalyzer1 for one of our controls, call the SetCustomPaintFunction method passing the pointer to the MyPaintFunction subroutine, obtained through the AddressOf function:

Private Sub Form_Load()

 ActiveWaveformAnalyzer1.SetCustomPaintFunction AddressOf MyPaintFunction

End Sub

Note that you can call the SetCustomPaintFunction method from wherever you want, also passing different drawing function depending upon your rendering needs.

Visual C++ example

Write your own function like the one below (note that the function must have the _stdcall declaration):

void _stdcall MyPaintFunction (long hDC)

{

     HBRUSH brushColor = ::CreateSolidBrush (RGB (255,0,0));

     HBRUSH brushOld = (HBRUSH) ::SelectObject ((HDC) hDC, brushColor);

     ::Ellipse((HDC) hDC, 10, 10, 50, 50);

     ::SelectObject ((HDC) hDC, brushOld);

     ::DeleteObject (brushColor);

}

Supposing that we have created a member variable ActiveWaveformAnalyzer1 for one of our controls, you will have to call the following line:

ActiveWaveformAnalyzer1.SetCustomPaintFunction ((long) MyPaintFunction);


How to scroll the sound's waveform during playback

How to scroll the sound's waveform during playback

Many multimedia applications allow displaying a waveform scroller whose purpose is to scroll the waveform during playback and to keep the current position centered on the scrolling waveform, with a vertical line that indicates the effective playback position; the screenshot below shows a song's waveform when playback position is 0, meaning that the sound is stopped or paused:

the screenshot below shows a song's waveform when playback position is 5 seconds:

Active Waveform Analyzer allows implementing a scrolling waveform through the embedded WaveformScroller object accessible through the WaveformScroller property.

In order to create a scrolling waveform we need to call the WaveformScroller.Create method and then we need to set how many milliseconds of waveform will be displayed inside the waveform's view: by default this value is set to 10 seconds (5 seconds on the right of the vertical line and 5 seconds on the left of the vertical line) but it can be modified at any time through the WaveformScroller.SetViewLength method.

Graphical settings related to a specific waveform scroller can be retrieved and modified through the WaveformScroller.SettingsGet and WaveformScroller.lSettingsSet methods: both of them receive in input a WSCROLLER_SETTINGS data structure. You can also set a background picture to be displayed under the waveform through the WaveformScroller.SetBackPictureFromFile and WaveformScroller.SetBackPictureFromHandle methods.

Once the waveform analysis has been completed and the WaveAnalysisDone event has been received, the WaveformScroller object will automatically display the waveform of the sound with the current playback position centered and displayed by a vertical line, exactly as seen on the screenshot above.

The waveform scroller can also display eventual graphic items previously added to the waveform analyzer through one of the following methods:

· GraphicItemVerticalLineAdd method for vertical lines
· GraphicItemHorizontalLineAdd method for horizontal lines
· GraphicItemWaveRangeAdd method for wave ranges

You are free to decide which type of these graphic items you want to display, for example you could need displaying wave ranges only and omitting the rendering of vertical and horizontal lines; this behaviour can be set through the nGraphicItemsMask field of the WSCROLLER_SETTINGS data structure.

For further details about graphic items management you can refer to the How to add graphic items to the Waveform analyzer tutorial.

Below an example of two vertical lines, rendered in red color, when the current center position of the bitmap view is set to 5000 ms.

Below the same exact red lines when the current center position has been moved to 6000 ms.

The waveform scroller supports direct mouse interaction: through the left button of your mouse you can modify the current position by pressing the left button, moving the mouse horizontally and finally by releasing the button when the needed playback position is reached. During playback, pressing the left mouse button will also put the player in paused state; by releasing the mouse playback will be automatically resumed.

When playback position is moved through the mouse, the control fires the WaveScrollerManualScroll event that notifies the container application about the new position. As a further feature, any mouse event generated on the waveform scroller, for example when the right mouse button is clicked, will be notified to the container application through the WaveformScrollerMouseNotification event.

Examples of usage of the waveform scroller can be seen inside the SoundEditor sample.


How to manage Unicode characters in filenames and tags

How to manage Unicode characters in filenames and tags

All of our ActiveX controls support loading/saving files whose filename contains Unicode characters. Sound files with tags having fields containing Unicode characters are managed as well.

If you are a Visual Basic 6 developer, you certainly know that VB6 is built internally with Unicode support but all of its custom controls are only ANSI compliant, meaning that you will get a series of "???" when inserting Unicode characters inside a label control or inside a textbox. If your application needs to display Unicode characters on user interface elements, the unique alternative is using the "Microsoft Forms 2.0" (FM20.DLL) ActiveX control which comes with a set of Unicode compliant controls.

As a second VB6 issue, the "Microsoft Common Dialog Control" (ComDlg32.ocx), used to display common dialogs for open and save operations on files, is not Unicode compliant as well and Microsoft didn't give any alternative ActiveX control for this purpose; for this reason we have added to our control a set of methods which allows selecting files containing Unicode characters:

· CommonDialogShowOpen allows browsing a file to open
· CommonDialogGetInfoFromLastOpen allows obtaining details about the filename chosen for opening through a previous call to the CommonDialogShowOpen method
· CommonDialogShowSave allows browsing a file to save
· CommonDialogGetInfoFromLastSave allows obtaining details about the filename chosen for saving through a previous call to the CommonDialogShowSave method

In order to correctly manage Unicode characters with languages like Visual C++, you must compile the container application specifically for Unicode.


How to use Mnemonic Constants

How to use Mnemonic Constants

The use of Mnemonic Constants improves the readability of your code. This version of the control implements a new internal design to expose these public enumerated types. You will see them in the drop downs on property sheets and in Microsoft's Intellisense feature.

The only environment where this is not the case is Microsoft Visual C++ environment (due to the manner in which the environment communicates with the control).

The following is the full list of enumerated types with their associated properties:

Enumerated type | Corresponding properties or parameters
enumWanErrorCodes | LastError property
enumWaveformTypes | nWaveformType parameter of the BitmapViewSaveToFile and GetMinMaxPeakLevelsForRange methods
enumTrackerCursorModes | nCursorMode parameter of the SetTrackerCursors method
enumAnalyzerResolutions | nResolution field of the WANALYZER_GENERAL_SETTINGS data structure
enumWaveformStereoModes | nStereoVisualizationMode field of the WANALYZER_WAVEFORM_SETTINGS and WSCROLLER_SETTINGS data structures and nWaveformStereoMode parameter of the BitmapViewDrawToHdc method
enumVolumeScales | nAmplitudeScale field of the WANALYZER_RULERS_SETTINGS data structure
enumMouseActions | nAction parameter of the WaveAnalyzerMouseNotification event
enumWaveAnalyzerRectangles | nIdRectangle parameter of the GetRectangle method
enumGraphicFormats | nFormat parameter of the BitmapViewSaveToFile method
enumCommonDialogInfo | nInfo parameter of the CommonDialogGetInfoFromLastOpen and CommonDialogGetInfoFromLastSave methods.
enumHorizontalLineHeadlineType | nHeadlineType parameter of the GraphicItemHorizontalLineAdd and GraphicItemHorizontalLineParamsSet methods
enumHorizontalLineChannel | nChannel parameter of the GraphicItemHorizontalLineAdd, GraphicItemHorizontalLineParamsSet methods and nChannel field of the WANALYZER_HORIZONTAL_LINE data structure
enumGraphicItemType | nType parameter of the GraphicItemTypeGet, GraphicItemsTypeShow and GraphicItemUniqueIdGet methods
enumGraphicItemMaskValues | nGraphicItemsMask parameter of the GraphicItemsMouseMoveEnable and BitmapViewGraphicItemsMaskSet methods and nGraphicItemsMask field of the WANALYZER_SCROLLBARS_SETTINGS and WSCROLLER_SETTINGS data structures
enumWaveformLineDashStyles | Some field of the WANALYZER_GENERAL_SETTINGS, WANALYZER_VERTICAL_LINE, WANALYZER_HORIZONTAL_LINE and WSCROLLER_SETTINGS data structures
enumLineCaps | Some field of the WANALYZER_GENERAL_SETTINGS, WANALYZER_VERTICAL_LINE, WANALYZER_HORIZONTAL_LINE and WSCROLLER_SETTINGS data structures
enumLineDashCaps | Some field of the WANALYZER_GENERAL_SETTINGS, WANALYZER_VERTICAL_LINE, WANALYZER_HORIZONTAL_LINE and WSCROLLER_SETTINGS data structures
enumBuddyAlignment | nAlignment field of the WANALYZER_BUDDY_PICTURE and WANALYZER_BUDDY_TEXT data structures
enumMouseButtons | nButton parameter of the WaveAnalyzerGraphicItemClick and WaveAnalyzerGraphicItemDblClick events
enumWaveformSelectionMode | nSelectionMode field of the WANALYZER_WAVEFORM_SETTINGS data structure
enumTranspGlassType | nTransparentGlassType field of the WANALYZER_WAVEFORM_SETTINGS and WANALYZER_SCROLLBARS_SETTINGS data structures
enumWaveScrollbarType | nType field of the WANALYZER_SCROLLBARS_SETTINGS data structure
enumScrollbarWaveVisibleRangeType | nVisibleRangeType field of the WANALYZER_SCROLLBARS_SETTINGS data structure
enumWaveScrollerAutoUpdate | nUpdateSpeed field of the WSCROLLER_SETTINGS data structure

The following examples, under different development environments, show how to use Mnemonic Constants in your code. These examples assume that one instance of the control, named AudioSoundRecorder1, exists on a form or dialog box. The purpose of this sample code is to check if the recorder is currently ripping a CD track.

Microsoft Visual C++ (4.0, 5.0, 6.0 and .NET)

Microsoft Visual Basic 5 and 6

Microsoft Visual C++ (4.0, 5.0, 6.0 and .NET)

Because of the different behaviour of these environments, you need to include the header file WavMmsEngDef.h in order to use predefined Mnemonic Constants: This module can be found inside the product Include directory (default C:\Program Files\Active Waveform Analyzer\include).

You can test the last error code using the following line of code:

if (ActiveWaveformAnalyzer1.GetLastError () != ERR_WAN_NOERROR)

 // do something

 .....

else

 // do something else

 .....

The GetLastError method is defined by the control wrapper class CActiveWaveformAnalyzer contained inside the ActiveWaveformAnalyzer.cpp and ActiveWaveformAnalyzer.h files: these wrapper files are automatically generated when you insert the control inside your project. So, in order to access this function, you will have to insert the following line of code somewhere in your code.

#include "ActiveWaveformAnalyzer.h"

The mnemonic constant ERR_WAN_NOERROR can be found inside the WavMmsEngDef.h module file. So, in order to access this value, you will have to insert the following line of code somewhere in your code.

#include "WavMmsEngDef.h"

Microsoft Visual Basic 5 and 6

In this environment you can use that IntelliSense features that make it easy to assign the intended value to the method parameter.

After typing the code...

If ActiveWaveformAnalyzer1.LastError

press the "=" key on your keyboard. IntelliSense displays the listbox of the possible values that can used to check the value of the LastError property:

Select the ERR_WAN_NOERROR value to complete the line of code as follows:

If ActiveWaveformAnalyzer1.LastError = ERR_WAN_NOERROR Then

 ' do something

 .....

Else

 ' do something else

 .....

End If


LastError property (RO)

LastError property (RO)

Return to chapter overview

Type

enumWanErrorCodes for Visual Basic

long for Visual C++

This property is Read-only

Remarks

Each call to one of the component's methods could generate an error: in case the called method should return an unexpected value, this property could give more details about the nature of the error. In case the called method should success, this property would assume the value ERR_WAN_NOERROR (0).

Here follows a list of the available error codes that could be returned by the component's methods calls:

Mnemonic value | Numeric value | Meaning
ERR_WAN_NOERROR | 0 | No error was generated by the latest method call
ERR_WAN_INVALID_ANALYZER | -1 | Invalid waveform analyzer
ERR_WAN_SOUND_WAVEFORM_NOT_ANALYSED | -2 | Sound waveform not analyzed
ERR_WAN_VALUE_OUT_OF_RANGE | -3 | Value out of range
ERR_WAN_NO_SELECTION_AVAIL | -4 | No selection available
ERR_WAN_ALREADY_EXISTS | -5 | The element already exists
ERR_WAN_SOUND_NOT_LOADED | -6 | Sound not loaded
ERR_WAN_NOT_FOUND | -7 | Element not found
ERR_WAN_INVALID_POSITION | -8 | Invalid position
ERR_WAN_INVALID_FILE | -9 | Invalid file
ERR_WAN_NOT_ENOUGH_MEMORY | -10 | Not enough memory
ERR_WAN_CANNOT_CREATE_FILE | -11 | Cannot create file
ERR_WAN_NOT_INITIALIZED | -12 | Control not initialized
ERR_WAN_BUSY | -13 | Busy
ERR_WAN_INVALID_WINDOW | -14 | Invalid window
ERR_WAN_CANNOT_INIT_GDIPLUS | -15 | Cannot initialize GDI+
ERR_WAN_INVALID_FORMAT | -16 | Invalid format
ERR_WAN_CANNOT_CREATE_WINDOW | -17 | Cannot create window
ERR_WAN_ALREADY_INITIALIZED | -18 | Already initialized
ERR_WAN_GENERIC | -100 | Generic or unknown error


hWnd property (RO)

Copyright © 2013-2017 MultiMedia Soft

hWnd property (RO)

Return to chapter overview
Type | OLE_HANDLE for Visual C++ long for Visual Basic This property is Read-Only
Remarks | Returns the control's window handle.


WaveformScroller property (RO)

WaveformScroller property (RO)

Return to chapter overview

Type

CWaveformScroller for Visual C++

ACTIVEWAVEFORMANALYZERLib.WaveformScroller for Visual Basic

This property is Read-only

Syntax

object.WaveformScroller [=ACTIVEWAVEFORMANALYZERLib.WaveformScroller]

Remarks

The embedded Waveform scroller display object.

This property encapsulates the functionality of the WaveformScroller object and the IWaveformScroller COM interface.

For details about creating and using a WaveformScroller refer to the How to scroll the sound's waveform during playback tutorial.


AboutBox method

AboutBox method

Remarks

Displays information about the control.

Syntax

[Visual Basic]

control.AboutBox (

)

[C++]

void control.AboutBox (

);


EnableAutoWaveAnalysisOnLoad method

EnableAutoWaveAnalysisOnLoad method

Remarks

Enables/disables the automatic waveform analysis during decoding of a media file through Microsoft Media Foundation or during extraction of the audio track of a video clip through Microsoft DirectShow.

Syntax

[Visual Basic]

control.EnableAutoWaveAnalysisOnLoad (

bEnable as enumBoolean

) as enumWanErrorCodes

[C++]

short control.EnableAutoWaveAnalysisOnLoad (

short bEnable

);

Parameter

Description

bEnable

Boolean value that specifies if auto analysis is enabled.

Supported values are the following:

Value | Meaning
BOOL_FALSE (default) | Auto analysis is disabled.
BOOL_TRUE | Auto analysis is enabled.

Return value

Value | Meaning
Negative value | An error occurred. Check the LastError property value in order to see the last error.
enumErrorCodes.ERR_NOERROR (0) | The method call was successful.


FromMsToFormattedTime method

FromMsToFormattedTime method

Remarks

Given an amount of time, expressed in milliseconds, retrieves a string containing the formatted time using the following format [hh:mm:ss:ms(3)] in which hh is for hours, mm is for minutes, ss is for seconds and ms(3) are three characters representing the milliseconds.

For example "04:34:200" indicates a time of 0 hours, 4 minutes, 34 seconds and 200 milliseconds.

Syntax

[Visual Basic]

control.FromMsToFormattedTime (

nTimeInMs as Double,

bShowHour as enumBoolean,

bShowMs as enumBoolean,

strHourSeparator as String,

strMsSeparator as String,

nNumberOfMsDigits as Integer

) as String

[C++]

LPCTSTR control.FromMsToFormattedTime (

double nTimeinMs,

short bShowHour,

short bShowMs,

BSTR strHourSeparator,

BSTR strMsSeparator,

short nNumberOfMsDigits

);

Parameter

Description

nfTimeInMs

Time, expressed in milliseconds, to convert to a formatted string

bShowHour

Boolean value that specifies the player to avoid displaying the 'hour' position field.

Supported values are the following:

Mnemonic constant | Value | Meaning
BOOL_FALSE | 0 | Doesn't show hour value
BOOL_TRUE | 1 | Shows hour value

bShowMs

Boolean value that specifies the player to avoid displaying the 'milliseconds' position field.

Supported values are the following:

Mnemonic constant | Value | Meaning
BOOL_FALSE | 0 | Doesn't show milliseconds value
BOOL_TRUE | 1 | Shows milliseconds value

strHourSeparator

Character used to separate hours, minutes and seconds, typically this should be set to ":"

strMsSeparator

Character used to separate seconds and milliseconds, typically this should be set to "."

nNumberOfMsDigits

Number of characters used to represent milliseconds digits, can be in the range from 1 to 3; values outside this range will be automatically set to 3.

Return value

Value | Meaning
Empty string | An error occurred (see the LastError property for further error details)
Valid string | The formatted time


GetControlVersion method

GetControlVersion method

Remarks

Retrieves the version of the control.

Syntax

[Visual Basic]

control.GetControlVersion (

) as String

[C++]

LPCTSTR control.GetControlVersion (

);

Return value

String containing the control's version.


GetEngineVersion method

GetEngineVersion method

Remarks

Retrieves the version of the multimedia engine.

Syntax

[Visual Basic]

control.GetEngineVersion (

) as String

[C++]

LPCTSTR control.GetEngineVersion (

);

Return value

String containing the version of the multimedia engine.


GetHwnd method

GetHwnd method

Remarks

Retrieves the window handle (HWND) of the control. This method is useful when using the control in scripting languages like JavaScript where the HWND of the control is not directly accessible.

Syntax

[Visual Basic]

control.GetHwnd (

) as Long

[C++]

long control.GetHwnd (

);

Return value

Number representing the window handle (HWND) of the control.


GetAnalyzedSoundDuration method

GetAnalyzedSoundDuration method

Remarks

Obtains the duration of the analyzed sound.

Syntax

[Visual Basic]

control.GetAnalyzedSoundDuration (

nDuration as Long

) as long

[C++]

long control.GetAnalyzedSoundDuration (

long *nDuration

);

Parameter | Description
nDuration | Reference that, after returning from the method call, will contain the duration of the analyzed file expressed in milliseconds

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to see the error code meaning
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful.


GetSupportedRawModesCount method

GetSupportedRawModesCount method

Remarks

Retrieves the number of RAW formats supported natively by the control.

The friendly description of each RAW format can be obtained using the GetSupportedRawModeDesc method.

Syntax

[Visual Basic]

control.GetSupportedRawModesCount (

nRawModesCount as Long

) as enumWanErrorCodes

[C++]

short control.GetSupportedRawModesCount (

long *nRawModesCount

);

Parameter

Description

nRawModesCount

Reference that, after returning from the method call, will contain the number of RAW formats supported natively by the control.

Supported RAW formats are listed inside the AnalyzeSoundFromFileRaw and ExternalSoundAnalysisStart methods.

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


GetSupportedRawModeDesc method

GetSupportedRawModeDesc method

Remarks

Retrieves the friendly description of the requested RAW format.

The number of RAW formats supported natively by the control can be obtained using the GetSupportedRawModesCount method.

Syntax

[Visual Basic]

control.GetSupportedRawModeDesc (

nEncodeModeIndex as Long

) as String

[C++]

LPCTSTR control.GetSupportedRawModeDesc (

long nEncodeModeIndex

);

Parameter | Description
nEncodeModeIndex | Number representing the zero-based index of the RAW format. Supported RAW formats are listed inside the AnalyzeSoundFromFileRaw and ExternalSoundAnalysisStart methods.

Return value

Value | Meaning
Empty string | An error occurred. Check the LastError property value in order to see the last error.
Valid string | The string containing the friendly description of the requested RAW format.


InitWaveformAnalyzer method

InitWaveformAnalyzer method

Remarks

Initializes the control: the call to this method is mandatory and must be performed before calling any other method of the control, possibly in the container form initialization function: calling this method inside the constructor function of the container form will not work and could cause unpredictable results.

Syntax

[Visual Basic]

control.InitWaveformAnalyzer (

hWndParent as OLE_HANDLE

) as enumWanErrorCodes

[C++]

short control.InitWaveformAnalyzer (

OLE_HANDLE hWndParent

);

Parameter | Description
hWndParent | Handle of the container (parent) window: for Visual Basic is represented by the hWnd property of the container form, while for Visual C++ is represented by the call to the container dialog box GetSafeHwnd member function: the return value of this call represents a HWND so it must be cast to OLE_HANDLE to avoid compiler errors

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to see the error code meaning
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful.


SetCustomPaintFunction method

SetCustomPaintFunction method

Remarks

Provides a pointer to a custom drawing function that will be invoked immediately before completing the waveform analyzer rendering.

For further details about custom graphic rendering see the How to perform custom graphic rendering over the control's surface tutorial.

Syntax

[Visual Basic]

control.SetCustomPaintFunction (

pFunction as Long

) as long

[C++]

long control.SetCustomPaintFunction (

long pFunction

);

Parameter | Description
pFunction | Pointer to the custom drawing function

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to see the error code meaning
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful.


BitmapViewDrawToHdc method

BitmapViewDrawToHdc method

Remarks

Renders the bitmap view of the given waveform range inside a graphical Device Context (HDC).

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.BitmapViewDrawToHdc (

hDC as OLE_HANDLE,

nPosLeft as Long,

nPosTop as Long,

nWidth as Long,

nHeight as Long,

nWaveformStereoMode as enumWaveformStereoModes,

bUseHalfColorsForPeaks as enumBoolean,

bShowMaskedGraphicItems as enumBoolean,

nStartPos as Long,

nEndPos as Long

) as enumWanErrorCodes

[C++]

short control.BitmapViewDrawToHdc (

OLE_HANDLE hDC,

long nPosLeft,

long nPosTop,

long nWidth,

long nHeight,

short nWaveformStereoMode,

short bUseHalfColorsForPeaks,

short bShowMaskedGraphicItems,

long nStartPos,

long nEndPos

);

Parameter

Description

hDC

Handle to the output graphical Device Context

nPosLeft

Horizontal left position, expressed in pixels, of the destination rectangle where the bitmap will be rendered on the Device Context

nPosTop

Vertical top position, expressed in pixels, of the destination rectangle where the bitmap will be rendered on the Device Context

nWidth

Width, expressed in pixels, of the destination rectangle on the Device Context

nHeight

Height, expressed in pixels, of the destination rectangle on the Device Context

nWaveformStereoMode

Visualization mode used for displaying stereo sounds

Supported values are the following:

Mnemonic constant | Value | Meaning
STEREO_MODE_CHANNELS_BOTH | 0 | Right and left channels are displayed separately on two different panes as seen on the pictures A and B above.
STEREO_MODE_CHANNELS_LEFT | 1 | Only the left channel content is displayed on a single pane
STEREO_MODE_CHANNELS_RIGHT | 2 | Only the right channel content is displayed on a single pane
STEREO_MODE_CHANNELS_MIXED | 3 | Right and left channels contents are mixed together and displayed on a single pane

bUseHalfColorsForPeaks

Boolean value that determines if waveform peaks will have a half intensity color.

Supported values are the following:

Mnemonic constant | Value | Meaning
False | 0 | Doesn't use half color for peaks
True (default) | 1 | Uses half color for peaks

bShowMaskedGraphicItems

Boolean flag that determines if eventual graphic items, enabled/disabled through the BitmapViewGraphicItemsMaskSet method, should be rendered over the waveform.

Supported values are the following:

Mnemonic constant | Meaning
BOOL_FALSE | Doesn't render graphic items
BOOL_TRUE | Renders graphic items. See the How to add graphic items to the Waveform analyzer tutorial for details about graphic items management on the waveform analyzer.

nStartPos

Number representing the sound's position, expressed in milliseconds, where the waveform visualization begins.

The value 0 represents the sound's beginning.

This position can assume negative values as well; if for example you should need to display a 10 seconds range (10000 milliseconds), with the beginning of the sound on the center of the device context, you could set this value to -5000 and the nEndPos parameter to 5000; in this case position 0 of the sound would be rendered exactly on the center of the device context.

On the screenshots below you can see two portions of the same sound; in the first case the vertical white line represents the position 0 ms of the song ranging from -5000 ms to +5000 ms; as you can see, the negative portion on the left, where no sound exists, is rendered as absence of audible sound.

In this seconds case the vertical white line represents the position 5000 ms of the song ranging from 0 ms to +10000 ms

nEndPos

Number representing the sound's position, expressed in milliseconds, where the waveform visualization ends.

The value -1 represents the sound's end.

This position can assume values higher respect the effective sound duration; for portions of sounds outside of the effective duration, the waveform is rendered as absence of audible sound as seen above for the nStartPos parameter when rendering negative positions.

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


BitmapViewGetWidth method

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


BitmapViewGraphicItemsMaskSet method

BitmapViewGraphicItemsMaskSet method

Remarks

Sets the mask for determining which graphic items will be rendered over the waveform through the BitmapViewDrawToHdc method.

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

Syntax

[Visual Basic]

control.BitmapViewGraphicItemsMaskSet (

nGraphicItemsMask as enumGraphicItemMaskValues

) as enumWanErrorCodes

[C++]

short control.BitmapViewGraphicItemsMaskSet (

short nGraphicItemsMask

);

Parameter

Description

nGraphicItemsMask

Combination of values determining the mask of graphic items that must be drawn. By default all graphic items are enabled for being drawn.

Supported values are the following:

Mnemonic constant | Value | Meaning
MASK_GRAPHIC_ITEM_NONE | 0 | No graphic item is drawn
MASK_GRAPHIC_ITEM_VERTICAL_LINE | 1 | Draws vertical lines
MASK_GRAPHIC_ITEM_HORIZONTAL_LINE | 2 | Draws horizontal lines
MASK_GRAPHIC_ITEM_WAVE_RANGE | 4 | Draw wave ranges

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.


BitmapViewSaveToFile method

BitmapViewSaveToFile method

Remarks

Creates a graphic file containing the bitmap view of the analysed sound waveform: the view can represent the full sound's waveform or portions of it.

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.BitmapViewSaveToFile (

nStartPos as Long,

nEndPos as Long,

nBitmapWidth as Long,

nBitmapHeight as Long,

nWaveformType as enumWaveformTypes,

strPathname as String,

nFormat as enumGraphicFormats,

nFormatParameter as Long

) as enumWanErrorCodes

[C++]

short control.BitmapViewSaveToFile (

long nStartPos,

long nEndPos,

long nBitmapWidth,

long nBitmapHeight,

short nWaveformType,

LPCTSTR strPathname,

short nFormat,

long nFormatParameter

);

Parameter

Description

nStartPos

Number representing the sound's position, expressed in milliseconds, where the waveform visualization begins.

The value 0 represents the sound's beginning.

nEndPos

Number representing the sound's position, expressed in milliseconds, where the waveform visualization ends.

The value -1 represents the sound's end.

nBitmapWidth

Number representing the generated bitmap width, expressed in pixels. A value of -1 indicates no width constraints: in this case the control will generate a bitmap large enough in order to contain the full sound's waveform.

nBitmapHeight

Number representing the generated bitmap height, expressed in pixels.

nWaveformType

The type of rendered waveform, related to the sound's channels.

Supported values are the following:

Mnemonic value | Value | Meaning
WAVEFORM_TYPE_LEFT | 0 | The bitmap contains sound data for the left channel
WAVEFORM_TYPE_RIGHT | 1 | The bitmap contains sound data for the right channel
WAVEFORM_TYPE_MIXED | 2 | The bitmap contains sound data for left and right mixed channels

strPathname

String containing the absolute pathname of the file where the waveform will be saved.

nFormat

Graphic format used to save the bitmap.

Supported values are the following:

Mnemonic value | Value | Meaning
GRAPHIC_FORMAT_BMP | 0 | BMP format
GRAPHIC_FORMAT_JPEG | 1 | JPEG format
GRAPHIC_FORMAT_PNG | 2 | PNG format
GRAPHIC_FORMAT_GIF | 3 | GIF format
GRAPHIC_FORMAT_TIFF | 4 | TIFF format

nFormatParameter

Eventual parameters required by the chosen graphic format.

When the nFormat parameter is set to GRAPHIC_FORMAT_JPEG, this parameter defines the JPEG compression factor whose range can be in the range from 0 (Maximum compression, Lower Quality) to 100 (Minimum compression, Higher Quality).

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


BitmapViewSaveToMemory method

BitmapViewSaveToMemory method

Remarks

Creates a view (in form of memory bitmap referenced by a HBITMAP) of the waveform for recorded sound: the view can represent the full sound's waveform or portions of it.

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.BitmapViewSaveToMemory (

nStartPos as Long,

nEndPos as Long,

nBitmapWidth as Long,

nBitmapHeight as Long,

nWaveformType as enumWaveformTypes

) as Long

[C++]

long control.BitmapViewSaveToMemory (

long nStartPos,

long nEndPos,

long nBitmapWidth,

long nBitmapHeight,

short nWaveformType

);

Parameter

Description

nStartPos

Number representing the sound's position, expressed in milliseconds, where the waveform visualization begins.

The value 0 represents the sound's beginning.

nEndPos

Number representing the sound's position, expressed in milliseconds, where the waveform visualization ends.

The value -1 represents the sound's end.

nBitmapWidth

Number representing the generated bitmap width, expressed in pixels. A value of -1 indicates no width constraints: in this case the control will generate a bitmap large enough in order to contain the full sound's waveform.

nBitmapHeight

Number representing the generated bitmap height, expressed in pixels.

nWaveformType

The type of rendered waveform, related to the sound's channels.

Supported values are the following:

Mnemonic value | Value | Meaning
WAVEFORM_TYPE_LEFT | 0 | The bitmap contains sound data for the left channel
WAVEFORM_TYPE_RIGHT | 1 | The bitmap contains sound data for the right channel
WAVEFORM_TYPE_MIXED | 2 | The bitmap contains sound data for left and right mixed channels

Return value

Value | Meaning
0 | An error occurred (check the LastError property for error details)
Value is not 0 | The method call was successful and the returned value represents the handle (HBITMAP) of the waveform's bitmap stored in memory. When the returned HBITMAP is no more needed or before exiting the container application, in order to avoid memory leaks this handle should be deleted using the DeleteObject Windows API.


CommonDialogGetInfoFromLastOpen method

CommonDialogGetInfoFromLastOpen method

Remarks

Obtains further information about the file chosen through a previous call to the CommonDialogShowOpen method.

For further information about dealing with Unicode characters, check the How to manage Unicode characters in filenames and tags tutorial.

Syntax

[Visual Basic]

control.CommonDialogGetInfoFromLastOpen (

nInfo as enumCommonDialogInfo

) as String

[C++]

LPCTSTR control.CommonDialogGetInfoFromLastOpen (

short nInfo

);

Parameter

Description

nInfo

Number representing the store mode.

Supported values are the following:

Mnemonic constant | Value | Meaning
COMMON_DLG_FULLPATHNAME | 0 | String representing the absolute pathname (path + filename) of the chosen file; this value is identical to the one returned by the CommonDialogShowOpen method Example "C:\myfolder\myfile.mp3".
COMMON_DLG_PATH | 1 | String representing the absolute path where the file is located (without the filename). Example "C:\myfolder\".
COMMON_DLG_FILENAME | 2 | String representing the filename of the chosen file. Example "myfile.mp3".
COMMON_DLG_FILENAME_NOEXT | 3 | String representing the filename of the chosen file without the extension. Example "myfile".
COMMON_DLG_EXT | 4 | String representing the extension of the chosen file. Example "mp3".

Return value

Value | Meaning
Empty string | Information not available or an error occurred.
Valid string | The requested information.


CommonDialogGetInfoFromLastSave method

CommonDialogGetInfoFromLastSave method

Remarks

Obtains further information about the file chosen through a previous call to the CommonDialogShowSave method.

For further information about dealing with Unicode characters, check the How to manage Unicode characters in filenames and tags tutorial.

Syntax

[Visual Basic]

control.CommonDialogGetInfoFromLastSave (

nInfo as enumCommonDialogInfo

) as String

[C++]

LPCTSTR control.CommonDialogGetInfoFromLastSave (

short nInfo

);

Parameter

Description

nInfo

Number representing the store mode.

Supported values are the following:

Mnemonic constant | Value | Meaning
COMMON_DLG_FULLPATHNAME | 0 | String representing the absolute pathname (path + filename) of the chosen file; this value is identical to the one returned by the CommonDialogShowOpen method Example "C:\myfolder\myfile.mp3".
COMMON_DLG_PATH | 1 | String representing the absolute path where the file is located (without the filename). Example "C:\myfolder\".
COMMON_DLG_FILENAME | 2 | String representing the filename of the chosen file. Example "myfile.mp3".
COMMON_DLG_FILENAME_NOEXT | 3 | String representing the filename of the chosen file without the extension. Example "myfile".
COMMON_DLG_EXT | 4 | String representing the extension of the chosen file. Example "mp3".

Return value

Value | Meaning
Empty string | Information not available or an error occurred.
Valid string | The requested information.


CommonDialogShowOpen method

CommonDialogShowOpen method

Remarks

Displays the standard dialog box used to select a file for opening. This method allows accessing filenames containing Unicode characters from development environments whose common dialog components don't manage Unicode natively like the "Microsoft Common Dialog Control" (ComDlg32.ocx) used by Visual Basic 6.

After choosing an input file, you can access more detailed information about it through the CommonDialogGetInfoFromLastOpen method.

For further information about dealing with Unicode characters, check the How to manage Unicode characters in filenames and tags tutorial.

Syntax

[Visual Basic]

control.CommonDialogShowOpen (

strDialogTitle as string,

strInitialDirectory as string,

strFilter as string,

nFilterIndex as integer

) as String

[C++]

LPCTSTR control.CommonDialogShowOpen (

BSTR strDialogTitle,

BSTR strInitialDirectory,

BSTR strFilter,

short *nFilterIndex

);

Parameter | Description
strDialogTitle | String representing the caption text of the dialog box.
strInitialDirectory | String representing the path of the directory where the browsing starts from.
strFilter | String representing the filter that let users limit which filenames appear for selection.
nFilterIndex | Reference that, on return from the method call, will contain the zero-based index of the filter selected by the user.

Return value

Value | Meaning
Empty string | The user pressed the Cancel button or didn't selected any file.
Valid string | The absolute pathname of the chosen file.


CommonDialogShowSave method

CommonDialogShowSave method

Remarks

Displays the standard dialog box used to select a file for saving. This method allows accessing filenames containing Unicode characters from development environments whose common dialog components don't manage Unicode natively like the "Microsoft Common Dialog Control" (ComDlg32.ocx) used by Visual Basic 6.

After choosing a destination file, you can access more detailed information about it through the CommonDialogGetInfoFromLastSave method.

For further information about dealing with Unicode characters, check the How to manage Unicode characters in filenames and tags tutorial.

Syntax

[Visual Basic]

control.CommonDialogShowSave (

strDialogTitle as string,

strInitialDirectory as string,

strFilter as string,

nFilterIndex as integer

) as String

[C++]

LPCTSTR control.CommonDialogShowSave (

BSTR strDialogTitle,

BSTR strInitialDirectory,

BSTR strFilter,

short *nFilterIndex

);

Parameter | Description
strDialogTitle | String representing the caption text of the dialog box.
strInitialDirectory | String representing the path of the directory where the browsing starts from.
strFilter | String representing the filter that let users limit which filenames appear for selection.
nFilterIndex | Reference that, on return from the method call, will contain the zero-based index of the filter selected by the user.

Return value

Value | Meaning
Empty string | The user pressed the Cancel button or didn't selected any file.
Valid string | The absolute pathname of the chosen file.


FreeMemory method

FreeMemory method

Remarks

Frees memory allocated by the Waveform Analyzer after a call to the AnalyzeSoundFromFile or AnalyzeSoundFromFileRaw methods and clears its window contents.

Syntax

[Visual Basic]

control.FreeMemory (

) as enumWanErrorCodes

[C++]

short control.FreeMemory (

);

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


GetDisplayRange method

GetDisplayRange method

Remarks

Retrieves the waveform range currently displayed on the analyzer window. The current range can be modified calling the SetDisplayRange method.

Syntax

[Visual Basic]

control.GetDisplayRange (

nBeginPosInMs as Long,

nEndPosInMs as Long

) as enumWanErrorCodes

[C++]

short control.GetDisplayRange (

long *nBeginPosInMs,

long *nEndPosInMs

);

Parameter | Description
nBeginPosInMs | Reference that, after returning from the method call, will contain the displayed range start position, expressed in milliseconds
nEndPosInMs | Reference that, after returning from the method call, will contain the displayed range end position, expressed in milliseconds

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


GetDisplayWidth method

GetDisplayWidth method

Remarks

Retrieves the actual size, expressed in both milliseconds and pixels, of the display surface used to render the waveform.

Syntax

[Visual Basic]

control.GetDisplayWidth (

nWidthInMs as Long,

nWidthInPixels as Long

) as enumWanErrorCodes

[C++]

short control.GetDisplayWidth (

long *nWidthInMs,

long *nWidthInPixels

);

Parameter | Description
nBeginPosInMs | Reference that, after returning from the method call, will contain the displayed range start position, expressed in milliseconds
nEndPosInMs | Reference that, after returning from the method call, will contain the displayed range end position, expressed in milliseconds

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


GetMinMaxPeakLevelsForRange method

GetMinMaxPeakLevelsForRange method

Remarks

Obtains the minimum and maximum peak levels inside a range of the recorded sound.

Syntax

[Visual Basic]

control.GetMinMaxPeakLevelsForRange (

nBeginPosInMs as Long,

nEndPosInMs as Long,

fPeakMin as Single,

fPeakMax as Single,

nWaveformType as enumWaveformType

) as enumWanErrorCodes

[C++]

short control.GetMinMaxPeakLevelsForRange (

long nBeginPosInMs,

long nEndPosInMs,

float *fPeakMin,

float *fPeakMax,

short nWaveformType

);

Parameter

Description

nBeginPosInMs

Range start position, expressed in milliseconds

nEndPosInMs

Range end position, expressed in milliseconds

fPeakMin

Reference that, after returning from the method call, will contain the minimum peak level, expressed in percentage

fPeakMax

Reference that, after returning from the method call, will contain the maximum peak level, expressed in percentage

nWaveformType

The type of waveform, related to the sound's channels.

Supported values are the following:

Mnemonic value | Value | Meaning
WAVEFORM_TYPE_LEFT | 0 | Peaks are detected inside the left channel
WAVEFORM_TYPE_RIGHT | 1 | Peaks are detected inside the right channel
WAVEFORM_TYPE_MIXED | 2 | Peaks are detected inside both left and right mixed channels

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


GetRectangle method

GetRectangle method

Remarks

Obtains the rectangle where a specific graphic element is positioned inside the Waveform Analyzer.

Syntax

[Visual Basic]

control.GetRectangle (

nIdRectangle as enumWaveAnalyzerRectangles,

nIdSecondary as Integer,

nLeft as Long,

nTop as Long,

nWidth as Long,

nHeight as Long

) as enumWanErrorCodes

[C++]

short control.GetRectangle (

short nIdRectangle,

short nIdSecondary,

long *nLeft,

long *nTop,

long *nWidth,

long *nHeight

);

Parameter

Description

nIdRectangle

Mnemonic Identifier of the graphic element

Supported values are the following:

Mnemonic value | Value | Meaning
WAVEANALYZER_RECT_TOTAL | 0 | Total rectangle
WAVEANALYZER_RECT_WAVEFORM | 1 | Waveform rectangle
WAVEANALYZER_RECT_WAVEFORM_LEFT_CH | 2 | Waveform rectangle for left channel
WAVEANALYZER_RECT_WAVEFORM_RIGHT_CH | 3 | Waveform rectangle for right channel
WAVEANALYZER_RECT_SB_TOP | 4 | Top scrollbar rectangle
WAVEANALYZER_RECT_SB_BOTTOM | 5 | Bottom scrollbar rectangle
WAVEANALYZER_RECT_RULER_LEFT | 6 | Left ruler rectangle
WAVEANALYZER_RECT_RULER_RIGHT | 7 | Right ruler rectangle
WAVEANALYZER_RECT_RULER_TOP | 8 | Top ruler rectangle
WAVEANALYZER_RECT_RULER_BOTTOM | 9 | Bottom ruler rectangle
WAVEANALYZER_RECT_SELECTION | 10 | Selected rectangle
WAVEANALYZER_RECT_PLAYBACK_LINE | 11 | Playback line rectangle
WAVEANALYZER_RECT_CUSTOM_LINE | 12 | Custom vertical line rectangle. If nWidth and nHeight dimensions of the rectangle are both set to 0, this means that the line is not on the visible area of the waveform
WAVEANALYZER_RECT_HORZ_LINE_LEFT | 13 | Horizontal line on left channel rectangle. If nWidth and nHeight dimensions of the rectangle are both set to 0, this means that the line is not on the visible area of the waveform
WAVEANALYZER_RECT_HORZ_LINE_RIGHT | 14 | Horizontal line on right channel rectangle. If nWidth and nHeight dimensions of the rectangle are both set to 0, this means that the line is not on the visible area of the waveform
WAVEANALYZER_RECT_WAVE_RANGE | 15 | Wave range rectangle. If nWidth and nHeight dimensions of the rectangle are both set to 0, this means that the wave range is not on the visible area of the waveform

nIdSecondary

Unique identifier of a specific graphic item added to the analyzer through a call to one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

Leave this parameter to 0 if the value of the nIdRectangle parameter is different from WAVEANALYZER_RECT_CUSTOM_LINE, WAVEANALYZER_RECT_HORZ_LINE_LEFT, WAVEANALYZER_RECT_HORZ_LINE_RIGHT or WAVEANALYZER_RECT_WAVE_RANGE.

nLeft

Reference that, after returning from the method call, will contain the left coordinate, expressed in pixels, of the requested rectangle respect to the client area of the Waveform Analyzer.

nTop

Reference that, after returning from the method call, will contain the top coordinate, expressed in pixels, of the requested rectangle respect to the client area of the Waveform Analyzer.

nWidth

Reference that, after returning from the method call, will contain the width, expressed in pixels, of the requested rectangle.

nHeight

Reference that, after returning from the method call, will contain the height, expressed in pixels, of the requested rectangle

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


GetSelection method

GetSelection method

Remarks

Retrieves the portion of waveform currently selected through the tracker. The current selection can be removed/modified calling the SetSelection method.

Syntax

[Visual Basic]

control.GetSelection (

bSelectionAvailable as enumBoolean,

nBeginPosInMs as Long,

nEndPosInMs as Long

) as enumWanErrorCodes

[C++]

short control.GetSelection (

long *bSelectionAvailable,

long *nBeginPosInMs,

long *nEndPosInMs

);

Parameter

Description

bSelectionAvailable

Reference that, after returning from the method call, will contain the flag for selection availability.

Supported values are the following:

Value | Meaning
BOOL_FALSE | No selection is currently available
BOOL_TRUE | A selection is currently available and its limits are stored inside nBeginPosInMs and nEndPosInMs parameters

nBeginPosInMs

Reference that, after returning from the method call, will contain the selection's start position, expressed in milliseconds

nEndPosInMs

Reference that, after returning from the method call, will contain the selection's end position, expressed in milliseconds

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


MouseSelectionEnable method

MouseSelectionEnable method

Remarks

Enables/disables selecting a waveform's range through the mouse.

During a playback session the mouse interaction is automatically disabled and an eventual call to this method will be ignored.

Syntax

[Visual Basic]

control.MouseSelectionEnable (

bShow as enumBoolean

) as enumWanErrorCodes

[C++]

short control.MouseSelectionEnable (

short bShow

);

Parameter

Description

bEnable

Boolean value that specifies if mouse-based selections are enabled or disabled

Supported values are the following:

Value | Meaning
BOOL_FALSE | Disables mouse-based selections
BOOL_TRUE (default) | Enables mouse-based selections

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


PeaksLoad method

PeaksLoad method

Remarks

Loads waveform's peaks from a source file previously saved through the PeaksSave method.

This method allows a fast retrieval of waveform's peaks without the need to perform a new sound analysis.

Syntax

[Visual Basic]

control.PeaksLoad (

strPathname as String

) as enumWanErrorCodes

[C++]

short control.PeaksLoad (

LPCTSTR strPathname

);

Parameter | Description
strPathname | String containing the absolute pathname of the source file.

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.


PeaksSave method

PeaksSave method

Remarks

Saves waveform's peaks into a destination file: this saved file can be retrieved at a later time through the PeaksLoad method, allowing a fast retrieval of waveform's peaks without the need to perform a new sound analysis.

Syntax

[Visual Basic]

control.PeaksSave (

strPathname as String

) as enumWanErrorCodes

[C++]

short control.PeaksSave (

LPCTSTR strPathname

);

Parameter | Description
strPathname | String containing the absolute pathname of the destination file.

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.


PlaybackPositionGet method

PlaybackPositionGet method

Remarks

Allows retrieving the latest playback position set through a previous call to the PlaybackPositionSet method.

Syntax

[Visual Basic]

control.PlaybackPositionGet (

nPosition as Long

) as enumWanErrorCodes

[C++]

short control.PlaybackPositionGet (

long *nPosition

);

Parameter | Description
nPosition | Reference that, after returning from the method call, will contain the current playback position expressed in milliseconds.

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


PlaybackPositionSet method

PlaybackPositionSet method

Remarks

Updates the playback position on the analyzer window and on the eventual waveform scroller object when the component is used in conjunction with a third-party multimedia library. The current playback position can be retrieved at a later time through the PlaybackPositionGet method.

The component doesn't come with playback capabilities so in case the waveform analyzer should be used in conjunction with a multimedia player implemented through a component like our "Active DJ Studio" ActiveX control or through third-party libraries like Leadtools Multimedia SDK, BASS, FMOD or through Microsoft's frameworks like Media Foundation and DirectShow, the component allows displaying the current playback position through a vertical line: this call should be inserted inside a place where there is the possibility to obtain the current playback position from the third-party multimedia library, for example inside a timer or inside a callback function invoked by the third-party multimedia library itself.

Syntax

[Visual Basic]

control.PlaybackPositionSet (

nPosition as Long

) as enumWanErrorCodes

[C++]

short control.PlaybackPositionSet (

long nPosition

);

Parameter | Description
nPosition | Number representing the new playback position expressed in milliseconds.

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


RefreshDisplay method

RefreshDisplay method

Remarks

Refreshes the Waveform Analyzer window.

Syntax

[Visual Basic]

control.RefreshDisplay (

) as enumWanErrorCodes

[C++]

short control.RefreshDisplay (

);

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


ScrollDisplay method

ScrollDisplay method

Remarks

Scrolls the waveform horizontally of a given amount of pixels

After a call to this method the control will fire the WaveAnalyzerDisplayRangeChange event.

Syntax

[Visual Basic]

control.ScrollDisplay (

nPixels as Long

) as enumWanErrorCodes

[C++]

short control.ScrollDisplay (

long nPixels

);

Parameter

Description

nPixels

Amount of pixels to scroll.

Value | Meaning
Negative value | Scroll the waveform to the left of the given amount of pixels
Positive value | Scroll the waveform to the right of the given amount of 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


SetDisplayRange method

SetDisplayRange method

Remarks

Changes the waveform range currently displayed on the analyzer window. The current range can be obtained calling the GetDisplayRange method.

After a call to this method the control will fire the WaveAnalyzerDisplayRangeChange event.

Syntax

[Visual Basic]

control.SetDisplayRange (

nBeginPosInMs as Long,

nEndPosInMs as Long

) as enumWanErrorCodes

[C++]

short control.SetDisplayRange (

long nBeginPosInMs,

long nEndPosInMs

);

Parameter | Description
nBeginPosInMs | Number representing the displayed range start position, expressed in milliseconds
nEndPosInMs | Number representing the displayed range end position, expressed in milliseconds

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


SetSelection method

SetSelection method

Remarks

Changes the portion of waveform currently selected through the tracker. The current selection, if any, can be retrieved calling the GetSelection method.

After a call to this method the control will fire the WaveAnalyzerSelectionChange event.

Syntax

[Visual Basic]

control.SetSelection (

bSelectionAvailable as enumBoolean,

nBeginPosInMs as Long,

nEndPosInMs as Long

) as enumWanErrorCodes

[C++]

short control.SetSelection (

long bSelectionAvailable,

long nBeginPosInMs,

long nEndPosInMs

);

Parameter

Description

bSelectionAvailable

Flag for selection availability.

Supported values are the following:

Value | Meaning
BOOL_FALSE | Remove the current selection, if any. In this case values passed through nBeginPosInMs and nEndPosInMs parameters are ignored.
BOOL_TRUE | Perform a new selection using values stored inside nBeginPosInMs and nEndPosInMs parameters

nBeginPosInMs

The selection's start position, expressed in milliseconds

nEndPosInMs

The selection's end position, expressed in milliseconds

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


SetTrackerCursors method

SetTrackerCursors method

Remarks

Sets the cursors used by the trackers for resizing and panning operations.

Syntax

[Visual Basic]

control.SetSelection (

nCursorMode as enumTrackerCursorModes,

hCursorResize as OLE_HANDLE,

hCursorPan as OLE_HANDLE

) as enumWanErrorCodes

[C++]

short control.SetSelection (

short nCursorMode,

OLE_HANDLE hCursorResize,

OLE_HANDLE hCursorPan

);

Parameter

Description

nCursorMode

The cursor mode.

Supported values are the following:

Mnemonic Value | Numeric value | Meaning
TRACKER_CURSOR_MODE_ARROWS (default) | 0 | Arrow based cursors. For resizing operations: For panning operations:
TRACKER_CURSOR_MODE_HANDS | 1 | Hand based cursors. For resizing operations: For panning operations:
TRACKER_CURSOR_MODE_CUSTOM | 2 | Custom cursors defined by the handles passed through the hCursorResize and hCursorPan parameters.

hCursorResize

If the cursor mode is set to TRACKER_CURSOR_MODE_CUSTOM, represents the handle to the cursor used for tracker's resizing operations, otherwise it's ignored

hCursorPan

If the cursor mode is set to TRACKER_CURSOR_MODE_CUSTOM, represents the handle to the cursor used for tracker's panning operations, otherwise it's ignored

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


ZoomIn method

ZoomIn method

Remarks

Zooms in the waveform.

After a call to this method the control will fire the WaveAnalyzerDisplayRangeChange event.

Syntax

[Visual Basic]

control.ZoomIn (

) as enumWanErrorCodes

[C++]

short control.ZoomIn (

);

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


ZoomOut method

ZoomOut method

Remarks

Zooms out the waveform.

After a call to this method the control will fire the WaveAnalyzerDisplayRangeChange event.

Syntax

[Visual Basic]

control.ZoomOut (

) as enumWanErrorCodes

[C++]

short control.ZoomOut (

);

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


ZoomToFullSound method

ZoomToFullSound method

Remarks

Zooms out and display the whole waveform.

After a call to this method the control will fire the WaveAnalyzerDisplayRangeChange event.

Syntax

[Visual Basic]

control.ZoomToFullSound (

) as enumWanErrorCodes

[C++]

short control.ZoomToFullSound (

);

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


ZoomToSelection method

ZoomToSelection method

Remarks

If a waveform's selection is available, zooms its contents.

After a call to this method the control will fire the WaveAnalyzerDisplayRangeChange event.

Syntax

[Visual Basic]

control.ZoomToSelection (

bRemoveSelectionAfterZoom as enumBoolean

) as enumWanErrorCodes

[C++]

short control.ZoomToSelection (

short bRemoveSelectionAfterZoom

);

Parameter

Description

bRemoveSelectionAfterZoom

Tells to remove the actual selection, if any, after the zoom operation.

Supported values are the following:

Value | Meaning
BOOL_FALSE | Leaves the current selection after zooming.
BOOL_TRUE | Removes the current selection after zooming.

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


GraphicItemBuddyPictureGet method

GraphicItemBuddyPictureGet method

Remarks

Obtains the HBITMAP of the eventually existing buddy picture for the given graphic item.

On the screenshot below you can see a set of vertical lines displayed over the waveform, each with its buddy picture aligned on the bottom right of the vertical line:

An existing buddy picture can be removed at a later time by calling this method again with the HBITMAP parameter set to IntPtr.Zero.

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

Syntax

[Visual Basic]

control.GraphicItemBuddyPictureGet (

nUniqueId as Long,

ByRef hBitmap as OLE_HANDLE

) as enumWanErrorCodes

[C++]

short control.GraphicItemBuddyPictureGet (

long nUniqueId,

OLE_HANDLE *hBitmap

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

hBitmap

Reference that, on return from the method call, will contain the HBITMAP of the picture.

In order to avoid leaks of system resource, when the HBITMAP is no more needed the container application should free it by calling the DeleteObject function of the Windows API.

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.


GraphicItemBuddyPictureParamsGet method

GraphicItemBuddyPictureParamsGet method

Remarks

Obtains parameters of a buddy picture associated to a graphic item over the waveform's graphics. These parameters can be modified through the GraphicItemBuddyPictureParamsSet method.

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

Syntax

[Visual Basic]

control.GraphicItemBuddyPictureParamsGet (

nUniqueId as Long,

settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemBuddyPictureParamsGet (

long nUniqueId,

void *settings

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

settings

Address of a structure of type WANALYZER_BUDDY_PICTURE that receives in output the current settings of the buddy picture.

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.


GraphicItemBuddyPictureParamsGetEx method

GraphicItemBuddyPictureParamsGetEx method

Remarks

Obtains the value of one of the settings for the buddy picture of the given graphic item. Value of single settings can be modified through the GraphicItemBuddyPictureParamsSetEx method.

This method is an alternative to the GraphicItemBuddyPictureParamsGet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.GraphicItemBuddyPictureParamsGetEx (

nUniqueId as Integer,

nParam as short

) as String

[C++]

BSTR control.GraphicItemBuddyPictureParamsGetEx (

short nUniqueId,

short nParam

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | colorTransp member of the WANALYZER_BUDDY_PICTURE data structure
1 | nTranspFactor member of the WANALYZER_BUDDY_PICTURE data structure
2 | nAlignment member of the WANALYZER_BUDDY_PICTURE data structure
3 | nResizeWidth member of the WANALYZER_BUDDY_PICTURE data structure
4 | nResizeHeight member of the WANALYZER_BUDDY_PICTURE data structure
5 | bKeepVisible member of the WANALYZER_BUDDY_PICTURE data structure

Return value

Value

Meaning

Empty string

An error occurred: see the LastError property for further error details or for a list of the possible error values.

Valid string

String containing the value of the requested parameter.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"


GraphicItemBuddyPictureParamsSet method

GraphicItemBuddyPictureParamsSet method

Remarks

Obtains parameters of a buddy picture associated to a graphic item over the waveform's graphics. Current parameters can be obtained through the GraphicItemBuddyPictureParamsGet method.

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

Syntax

[Visual Basic]

control.GraphicItemBuddyPictureParamsSet (

nUniqueId as Long,

settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemBuddyPictureParamsSet (

long nUniqueId,

void *settings

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

settings

Address of a structure of type WANALYZER_BUDDY_PICTURE that contains the new settings of the buddy picture.

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.


GraphicItemBuddyPictureParamsSetEx method

GraphicItemBuddyPictureParamsSetEx method

Remarks

Modifies one of the settings for the buddy picture of the given graphic item. Value of single settings can be obtained through the GraphicItemBuddyPictureParamsGetEx method.

This method is an alternative to the GraphicItemBuddyPictureParamsSet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.GraphicItemBuddyPictureParamsSetEx (

nUniqueId as Integer,

nParam as short,

strValue as String

) as enumWanErrorCodes

[C++]

short control.GraphicItemBuddyPictureParamsSetEx (

short nUniqueId,

short nParam,

LPCTSTR strValue

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | colorTransp member of the WANALYZER_BUDDY_PICTURE data structure
1 | nTranspFactor member of the WANALYZER_BUDDY_PICTURE data structure
2 | nAlignment member of the WANALYZER_BUDDY_PICTURE data structure
3 | nResizeWidth member of the WANALYZER_BUDDY_PICTURE data structure
4 | nResizeHeight member of the WANALYZER_BUDDY_PICTURE data structure
5 | bKeepVisible member of the WANALYZER_BUDDY_PICTURE data structure

strValue

String representing the numerical value to set: the multimedia engine will manage converting the string into the corresponding numerical value.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"

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.


GraphicItemBuddyPictureSetFromFile method

GraphicItemBuddyPictureSetFromFile method

Remarks

Sets a picture taken from a file that will be displayed as a buddy picture of a graphic item over the waveform's graphics. The HBITMAP of the current buddy picture can be obtained through the GraphicItemBuddyPictureGet method.

Settings of the buddy picture can be obtained and modified through the GraphicItemBuddyPictureParamsGet and GraphicItemBuddyPictureParamsSet methods.

On the screenshot below you can see a set of vertical lines displayed over the waveform, each with its buddy picture aligned on the bottom right of the vertical line:

In this case vertical lines are set to be rendered over time rulers, allowing buddy pictures to be rendered outside of the waveform area.

An existing buddy picture can be removed at a later time by calling this method again and by specifying an empty pathname.

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

Syntax

[Visual Basic]

control.GraphicItemBuddyPictureSetFromFile (

nUniqueId as Long,

strPathname as String,

settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemBuddyPictureSetFromFile (

long nUniqueId,

LPCTSTR strPathname,

void *settings

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

strPathname

Absolute pathname of the picture file.

Supported graphic formats are BMP, ICO, GIF, JPG, TIF and PNG.

An empty string will remove an eventually existing buddy picture.

settings

Address of a structure of type WANALYZER_BUDDY_PICTURE that contains the settings of the new buddy picture.

These settings can be modified or retrieved at a later time through the GraphicItemBuddyPictureParamsSet and GraphicItemBuddyPictureParamsGet methods.

By setting this value to 0 the buddy picture will be rendered with default setting.

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.


GraphicItemBuddyPictureSetFromHandle method

GraphicItemBuddyPictureSetFromHandle method

Remarks

Sets a picture taken from a HBITMAP that will be displayed as a buddy picture of a graphic item over the waveform's graphics. The HBITMAP of the current buddy picture can be obtained through the GraphicItemBuddyPictureGet method.

Settings of the buddy picture can be obtained and modified through the GraphicItemBuddyPictureParamsGet and GraphicItemBuddyPictureParamsSet methods.

On the screenshot below you can see a set of vertical lines displayed over the waveform, each with its buddy picture aligned on the bottom right of the vertical line:

In this case vertical lines are set to be rendered over time rulers, allowing buddy pictures to be rendered outside of the waveform area.

An existing buddy picture can be removed at a later time by calling this method again with the HBITMAP parameter set to 0.

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

Syntax

[Visual Basic]

control.GraphicItemBuddyPictureSetFromHandle (

nUniqueId as Long,

hBitmap as OLE_HANDLE,

settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemBuddyPictureSetFromHandle (

long nUniqueId,

OLE_HANDLE hBitmap,

void *settings

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

hBitmap

HBITMAP of the picture. If this parameter is set to 0 an eventually existing buddy picture will be removed.

settings

Address of a structure of type WANALYZER_BUDDY_PICTURE that contains the settings of the new buddy picture.

These settings can be modified or retrieved at a later time through the GraphicItemBuddyPictureParamsSet and GraphicItemBuddyPictureParamsGet methods.

By setting this value to 0 the buddy picture will be rendered with default setting.

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.


GraphicItemBuddyPictureSetFromMemory method

GraphicItemBuddyPictureSetFromMemory method

Remarks

Sets a picture taken from a memory stream that will be displayed as a buddy picture of a graphic item over the waveform's graphics. The HBITMAP of the current buddy picture can be obtained through the GraphicItemBuddyPictureGet method.

Settings of the buddy picture can be obtained and modified through the GraphicItemBuddyPictureParamsGet and GraphicItemBuddyPictureParamsSet methods.

On the screenshot below you can see a set of vertical lines displayed over the waveform, each with its buddy picture aligned on the bottom right of the vertical line:

In this case vertical lines are set to be rendered over time rulers, allowing buddy pictures to be rendered outside of the waveform area.

An existing buddy picture can be removed at a later time by calling the GraphicItemBuddyPictureSetFromFile method with an empty pathname.

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

Syntax

[Visual Basic]

control.GraphicItemBuddyPictureSetFromMemory (

nUniqueId as Long,

pBuffer as Variant,

nBufferLength as Long,

settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemBuddyPictureSetFromMemory (

long nUniqueId,

const VARIANT FAR& pBuffer,

long nBufferLength,

void *settings

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

pBuffer

Input buffer containing the graphic items in XML format.

Supported graphic formats are BMP, ICO, GIF, JPG, TIF and PNG.

nBufferLength

Length of the input buffer expressed in bytes

settings

Address of a structure of type WANALYZER_BUDDY_PICTURE that contains the settings of the new buddy picture.

These settings can be modified or retrieved at a later time through the GraphicItemBuddyPictureParamsSet and GraphicItemBuddyPictureParamsGet methods.

By setting this value to 0 the buddy picture will be rendered with default setting.

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.


GraphicItemBuddyTextGet method

GraphicItemBuddyTextGet method

Remarks

Obtains the buddy text of a graphic item over the waveform's graphics.

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

Syntax

[Visual Basic]

control.GraphicItemBuddyTextGet (

nUniqueId as Long,

ByRef hFontText as OLE_HANDLE

) as String

[C++]

LPCTSTR control.GraphicItemBuddyTextGet (

long nUniqueId,

OLE_HANDLE *hFontText

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

hFontText

Reference that, on return from the method call, will contain the handle (HFONT) of the font used for rendering the text.

In order to avoid leaks of system resource, when the font is no more needed the container application should free it by calling the DeleteObject function of the Windows API.

Return value

Value | Meaning
Empty string | Information not available or an error occurred (see the LastError property for further error details)
Valid string | The string of the buddy text


GraphicItemBuddyTextSet method

GraphicItemBuddyTextSet method

Remarks

Sets a buddy text of a graphic item over the waveform's graphics. The current buddy text can be obtained through the GraphicItemBuddyTextGet method.

Settings of the buddy text can be obtained and modified through the GraphicItemBuddyTextParamsGet and GraphicItemBuddyTextParamsSet methods.

On the screenshot below you can see a set of vertical lines displayed over the waveform, each with its buddy text aligned on the top right of the vertical line:

An existing buddy text can be removed at a later time by calling this method again and by specifying an empty text string.

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

Syntax

[Visual Basic]

control.GraphicItemBuddyTextSet (

nUniqueId as Long,

strText as String,

settings as Long,

hFontText as OLE_HANDLE

) as enumWanErrorCodes

[C++]

short control.GraphicItemBuddyTextSet (

long nUniqueId,

LPCTSTR strText,

void *settings,

OLE_HANDLE hFontText

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

strText

String of the buddy text.

An empty string will remove an eventually existing buddy text.

settings

Address of a structure of type WANALYZER_BUDDY_TEXT that contains the settings of the new buddy text.

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

By setting this value to 0 the buddy text will be rendered with default setting.

hFontText

The handle (HFONT) of the font used for rendering the text.

The component will make a copy of this font so, when the method's call returns to the caller, you can remove this font from system resources by calling the DeleteObject function of the Windows API.

By setting this value to 0 the buddy text will be rendered with the default font.

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.


GraphicItemBuddyTextParamsGet method

GraphicItemBuddyTextParamsGet method

Remarks

Modifies parameters of a buddy text associated to a graphic item over the waveform's graphics. Settings for the buddy text can be modified through the GraphicItemBuddyTextParamsSet method.

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

Syntax

[Visual Basic]

control.GraphicItemBuddyTextParamsGet (

nUniqueId as Long,

ByRef settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemBuddyTextParamsGet (

long nUniqueId,

void *settings

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

settings

Address of a structure of type WANALYZER_BUDDY_TEXT that receives in output the current settings of the buddy text.

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.


GraphicItemBuddyTextParamsGetEx method

GraphicItemBuddyTextParamsGetEx method

Remarks

Obtains the value of one of the settings for the buddy text of the given graphic item. Value of single settings can be modified through the GraphicItemBuddyTextParamsSetEx method.

This method is an alternative to the GraphicItemBuddyTextParamsGet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.GraphicItemBuddyTextParamsGetEx (

nUniqueId as Integer,

nParam as short

) as String

[C++]

BSTR control.GraphicItemBuddyTextParamsGetEx (

short nUniqueId,

short nParam

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | colorText member of the WANALYZER_BUDDY_TEXT data structure
1 | colorTextOutline member of the WANALYZER_BUDDY_TEXT data structure
2 | nOutlineWidth member of the WANALYZER_BUDDY_TEXT data structure
3 | nTranspFactor member of the WANALYZER_BUDDY_TEXT data structure
4 | nAlignment member of the WANALYZER_BUDDY_TEXT data structure
5 | bKeepVisible member of the WANALYZER_BUDDY_TEXT data structure

Return value

Value

Meaning

Empty string

An error occurred: see the LastError property for further error details or for a list of the possible error values.

Valid string

String containing the value of the requested parameter.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"


GraphicItemBuddyTextParamsSet method

GraphicItemBuddyTextParamsSet method

Remarks

Modifies parameters of a buddy text associated to a graphic item over the waveform's graphics. The current settings for the buddy text can be obtained through the GraphicItemBuddyTextParamsGet method.

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

Syntax

[Visual Basic]

control.GraphicItemBuddyTextParamsSet (

nUniqueId as Long,

settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemBuddyTextParamsSet (

long nUniqueId,

void *settings

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

settings

Address of a structure of type WANALYZER_BUDDY_TEXT that contains the new settings of the buddy text.

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.


GraphicItemBuddyTextParamsSetEx method

GraphicItemBuddyTextParamsSetEx method

Remarks

Modifies one of the settings for the buddy text of the given graphic item. Value of single settings can be obtained through the GraphicItemBuddyTextParamsGetEx method.

This method is an alternative to the GraphicItemBuddyTextParamsSet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.GraphicItemBuddyTextParamsSetEx (

nUniqueId as Integer,

nParam as short,

strValue as String

) as enumWanErrorCodes

[C++]

short control.GraphicItemBuddyTextParamsSetEx (

short nUniqueId,

short nParam,

LPCTSTR strValue

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | colorText member of the WANALYZER_BUDDY_TEXT data structure
1 | colorTextOutline member of the WANALYZER_BUDDY_TEXT data structure
2 | nOutlineWidth member of the WANALYZER_BUDDY_TEXT data structure
3 | nTranspFactor member of the WANALYZER_BUDDY_TEXT data structure
4 | nAlignment member of the WANALYZER_BUDDY_TEXT data structure
5 | bKeepVisible member of the WANALYZER_BUDDY_TEXT data structure

strValue

String representing the numerical value to set: the multimedia engine will manage converting the string into the corresponding numerical value.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"

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.


GraphicItemBuddyTextFontParamsSet method

GraphicItemBuddyTextFontParamsSet method

Remarks

Modifies one of the font settings for the buddy text of the given graphic item.

This method is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.GraphicItemBuddyTextFontParamsSet (

nUniqueId as Integer,

nParam as short,

strValue as String

) as enumWanErrorCodes

[C++]

short control.GraphicItemBuddyTextFontParamsSet (

short nUniqueId,

short nParam,

LPCTSTR strValue

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | lfFaceName member of the LOGFONT data structure (for details about the LOGFONT data structure see the MSDN documentation).
1 | lfHeight member of the LOGFONT data structure
2 | lfWeight member of the LOGFONT data structure
3 | lfItalic member of the LOGFONT data structure
4 | lfUnderline member of the LOGFONT data structure
5 | lfStrikeOut member of the LOGFONT data structure

strValue

String representing the numerical value to set: the multimedia engine will manage converting the string into the corresponding numerical value.

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.


GraphicItemDescriptionGet

GraphicItemDescriptionGet method

Remarks

Obtains the description of the given graphic item.

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

Syntax

[Visual Basic]

control.GraphicItemDescriptionGet (

nUniqueId as Long

) as string

[C++]

LPCTSTR control.GraphicItemDescriptionGet (

long nUniqueId

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

Return value

Value | Meaning
Empty string | Information not available or an error occurred (see the LastError property for further error details)
Valid string | The description of the graphic item


GraphicItemDescriptionSet method

GraphicItemDescriptionSet method

Remarks

Sets the description of the given graphic item.

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

Syntax

[Visual Basic]

control.GraphicItemDescriptionSet (

nUniqueId as Integer,

strDescription as String

) as enumWanErrorCodes

[C++]

short control.GraphicItemDescriptionSet (

short nUniqueId,

LPCTSTR strDescription

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

strDescription

String containing the description to assign to the graphic item

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.


GraphicItemHorizontalLineAdd method

GraphicItemHorizontalLineAdd method

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 GraphicItemHorzPositionSet method
· vertically through code using the GraphicItemVertPositionSet method or through the GraphicItemHorizontalLineParamsSet method.
· horizontally and vertically through the mouse, causing a sequence of WaveAnalyzerHorzLineMoveBegin, WaveAnalyzerHorzLineMoving and WaveAnalyzerHorzLineMoveEnd events to be generated.

During playback of the loaded sound, the WaveAnalyzerHorzLineReached event is generated when playback position reaches the start position of the horizontal line and the WaveAnalyzerHorzLineLeaved event is generated 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 FreeMemory method.

A horizontal line can be removed through the GraphicItemRemove method and hidden or shown through the 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.

Syntax

[Visual Basic]

control.GraphicItemHorizontalLineAdd (

strFriendlyName as String,

strDescription as String,

nStartPosInMs as Long,

nEndPosInMs as Long,

settings as Long

) as Integer

[C++]

short control.GraphicItemHorizontalLineAdd (

LPCTSTR strFriendlyName,

LPCTSTR strDescription,

long nStartPosInMs,

long nEndPosInMs,

void *settings

);

Parameter | Description
strFriendlyName | Friendly name of the line. This friendly name can be modified or retrieved at a later time through the GraphicItemNameGet and GraphicItemNameSet methods.
strDescription | Description of the line. This description can be modified or retrieved at a later time through the GraphicItemDescriptionGet and GraphicItemDescriptionSet methods.
nStartPosInMs | Start position expressed in milliseconds. This position can be modified or retrieved at a later time through the GraphicItemHorzPositionGet and GraphicItemHorzPositionSet methods.
nEndPosInMs | End position expressed in milliseconds. This position can be modified or retrieved at a later time through the GraphicItemHorzPositionGet and GraphicItemHorzPositionSet methods.
settings | Address of a structure of type WANALYZER_HORIZONTAL_LINE that contains the settings for the new line. These settings can be modified or retrieved at a later time through the GraphicItemHorizontalLineParamsSet and GraphicItemHorizontalLineParamsGet methods. By setting this value to 0 the graphic item will be rendered with default setting.

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.


GraphicItemHorizontalLineParamsGet method

GraphicItemHorizontalLineParamsGet method

Remarks

Obtains parameters of an existing horizontal line displayed over the waveform's graphics. These parameters can be modified through the GraphicItemHorizontalLineParamsSet method.

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

Syntax

[Visual Basic]

control.GraphicItemHorizontalLineParamsGet (

nUniqueId as Integer,

settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemHorizontalLineParamsGet (

short nUniqueId,

void *settings

);

Parameter | Description
nUniqueId | Unique identification number assigned to the line by a previous call to the GraphicItemHorizontalLineAdd method.
settings | Address of a structure of type WANALYZER_HORIZONTAL_LINE that receives in output the current settings of the line.

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.


GraphicItemHorizontalLineParamsGetEx method

GraphicItemHorizontalLineParamsGetEx method

Remarks

Obtains one of the settings for the given horizontal line added to the waveform analyzer. Value of single settings can be modified through the GraphicItemHorizontalLineParamsSetEx method.

This method is an alternative to the GraphicItemHorizontalLineParamsGet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.GraphicItemHorizontalLineParamsGetEx (

nUniqueId as Integer,

nParam as short

) as String

[C++]

BSTR control.GraphicItemHorizontalLineParamsGetEx (

short nUniqueId,

short nParam

);

Parameter

Description

nUniqueId

Unique identification number assigned to the line by a previous call to the GraphicItemHorizontalLineAdd method.

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | color member of the WANALYZER_HORIZONTAL_LINE data structure
1 | nChannel member of the WANALYZER_HORIZONTAL_LINE data structure
2 | nDashStyle member of the WANALYZER_HORIZONTAL_LINE data structure
3 | nHeightInPix member of the WANALYZER_HORIZONTAL_LINE data structure
4 | nTranspFactor member of the WANALYZER_HORIZONTAL_LINE data structure
5 | nVertPosInPerc member of the WANALYZER_HORIZONTAL_LINE data structure
6 | nLeftCap member of the WANALYZER_HORIZONTAL_LINE data structure
7 | nRightCap member of the WANALYZER_HORIZONTAL_LINE data structure
8 | nDashCap member of the WANALYZER_HORIZONTAL_LINE data structure

Return value

Value

Meaning

Empty string

An error occurred: see the LastError property for further error details or for a list of the possible error values.

Valid string

String containing the value of the requested parameter.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"


GraphicItemHorizontalLineParamsSet method

GraphicItemHorizontalLineParamsSet method

Remarks

Modifies parameters of an existing horizontal line displayed over the waveform's graphics. Current parameters can be obtained through the GraphicItemHorizontalLineParamsGet method.

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

Syntax

[Visual Basic]

control.GraphicItemHorizontalLineParamsSet (

nUniqueId as Integer,

settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemHorizontalLineParamsSet (

short nUniqueId,

void *settings

);

Parameter | Description
nUniqueId | Unique identification number assigned to the line by a previous call to the GraphicItemHorizontalLineAdd method.
settings | Address of a structure of type WANALYZER_HORIZONTAL_LINE containing new settings for the line.

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.


GraphicItemHorizontalLineParamsSetEx method

GraphicItemHorizontalLineParamsSetEx method

Remarks

Modifies one of the settings for the given graphic item added to the waveform analyzer. Value of single settings can be obtained through the GraphicItemHorizontalLineParamsGetEx method.

This method is an alternative to the GraphicItemHorizontalLineParamsSet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.GraphicItemHorizontalLineParamsSetEx (

nUniqueId as Integer,

nParam as short,

strValue as String

) as enumWanErrorCodes

[C++]

short control.GraphicItemHorizontalLineParamsSetEx (

short nUniqueId,

short nParam,

LPCTSTR strValue

);

Parameter

Description

nUniqueId

Unique identification number assigned to the line by a previous call to the GraphicItemHorizontalLineAdd method.

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | color member of the WANALYZER_HORIZONTAL_LINE data structure
1 | nChannel member of the WANALYZER_HORIZONTAL_LINE data structure
2 | nDashStyle member of the WANALYZER_HORIZONTAL_LINE data structure
3 | nHeightInPix member of the WANALYZER_HORIZONTAL_LINE data structure
4 | nTranspFactor member of the WANALYZER_HORIZONTAL_LINE data structure
5 | nVertPosInPerc member of the WANALYZER_HORIZONTAL_LINE data structure
6 | nLeftCap member of the WANALYZER_HORIZONTAL_LINE data structure
7 | nRightCap member of the WANALYZER_HORIZONTAL_LINE data structure
8 | nDashCap member of the WANALYZER_HORIZONTAL_LINE data structure

strValue

String representing the numerical value to set: the multimedia engine will manage converting the string into the corresponding numerical value.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"

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.


GraphicItemNameGet

GraphicItemNameGet method

Remarks

Obtains the friendly name of the given graphic item.

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

Syntax

[Visual Basic]

control.GraphicItemNameGet (

nUniqueId as Long

) as string

[C++]

LPCTSTR control.GraphicItemNameGet (

long nUniqueId

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

Return value

Value | Meaning
Empty string | Information not available or an error occurred (see the LastError property for further error details)
Valid string | The friendly name of the graphic item


GraphicItemNameSet method

GraphicItemNameSet method

Remarks

Sets the friendly name of the given graphic item.

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

Syntax

[Visual Basic]

control.GraphicItemNameSet (

nUniqueId as Integer,

strFriendlyName as String

) as enumWanErrorCodes

[C++]

short control.GraphicItemNameSet (

short nUniqueId,

LPCTSTR strFriendlyName

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

strFriendlyName

String containing the friendly name to assign to the graphic item

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.


GraphicItemHorzPositionGet method

GraphicItemHorzPositionGet method

Remarks

Obtains the current horizontal position of the given graphic item. The horizontal position can be modified through the GraphicItemHorzPositionSet method or through the mouse.

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

Syntax

[Visual Basic]

control.GraphicItemHorzPositionGet (

nUniqueId as Integer,

ByRef nStartPosInMs as Long,

ByRef nEndPosInMs as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemHorzPositionGet (

short nUniqueId,

long *nStartPosInMs,

long *nEndPosInMs

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

nStartPosInMs

Reference that, on return from the method call, will contain the start position of the item expressed in milliseconds

nEndPosInMs

Reference that, on return from the method call, will contain the end position of the item expressed in milliseconds

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.


GraphicItemHorzPositionSet method

GraphicItemHorzPositionSet method

Remarks

Sets the new horizontal position of the given graphic item. The current horizontal position can be obtained through the GraphicItemHorzPositionGet method.

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

Syntax

[Visual Basic]

control.GraphicItemHorzPositionSet (

nUniqueId as Integer,

nStartPosInMs as Long,

nEndPosInMs as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemHorzPositionSet (

short nUniqueId,

long nStartPosInMs,

long nEndPosInMs

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

nStartPosInMs

The new start position of the item expressed in milliseconds.

The call to this method fails if the specified position is less than 0 or higher than the total duration of the sound currently loaded into the editor

nEndPosInMs

The new end position of the item expressed in milliseconds (parameter ignored for vertical lines)

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.


GraphicItemRemove method

GraphicItemRemove method

Remarks

Removes the given graphic item.

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

Syntax

[Visual Basic]

control.GraphicItemRemove (

nUniqueId as Integer

) as enumWanErrorCodes

[C++]

short control.GraphicItemRemove (

short nUniqueId

);

Parameter

Description

nUniqueId

Unique identification number of the graphic item to remove.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

Set this parameter to -1 in order to remove all of the available graphic items.

In order to remove all of the graphic items of a given type, use the GraphicItemsTypeRemove method.

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.


GraphicItemShow method

GraphicItemShow method

Remarks

Shows/hides the given graphic item.

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

Syntax

[Visual Basic]

control.GraphicItemShow (

nUniqueId as Integer,

bShow as enumBoolean

) as enumWanErrorCodes

[C++]

short control.GraphicItemShow (

short nUniqueId,

short bShow

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

bShow

Boolean value that specifies if the graphic item must be shown or hidden.

Supported values are the following:

Value | Meaning
false | Hides the graphic item
true | Shows the graphic item

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.


GraphicItemTypeGet method

GraphicItemTypeGet method

Remarks

Given the unique identification number, obtains the type of graphic item.

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

Syntax

[Visual Basic]

control.GraphicItemTypeGet (

nUniqueId as Integer,

ByRef nType as enumGraphicItemType

) as enumWanErrorCodes

[C++]

short control.GraphicItemTypeGet (

short nUniqueId,

long *nType

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

nType

Reference that, on return from the method call, will contain the type of graphic item.

Supported values are the following:

Mnemonic constant | Numeric value | Meaning
GRAPHIC_ITEM_VERTICAL_LINE | 0 | Vertical line
GRAPHIC_ITEM_HORIZONTAL_LINE | 1 | Horizontal line
GRAPHIC_ITEM_WAVE_RANGE | 2 | Wave range

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.


GraphicItemUniqueIdGet method

GraphicItemUniqueIdGet method

Remarks

Obtains the unique identification number of a specific graphic item of a given type.

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

Syntax

[Visual Basic]

control.GraphicItemUniqueIdGet (

nType as enumGraphicItemType,

nIndex as Integer,

ByRef nUniqueId as Integer

) as enumWanErrorCodes

[C++]

short control.GraphicItemUniqueIdGet (

enumGraphicItemType nType,

short nIndex,

short *nUniqueId

);

Parameter

Description

nType

The type of graphic item.

Supported values are the following:

Mnemonic constant | Numeric value | Meaning
GRAPHIC_ITEM_VERTICAL_LINE | 0 | Vertical lines
GRAPHIC_ITEM_HORIZONTAL_LINE | 1 | Horizontal lines
GRAPHIC_ITEM_WAVE_RANGE | 2 | Wave ranges

nIndex

Zero-based index of the graphic item. The total number of available graphic items can be obtained through the GraphicItemsTypeCountGet method.

It's important to note that, after eventually removing graphic items through the GraphicItemRemove method, you will have to perform a new call to the GraphicItemsTypeCountGet in order to have an update enumeration of graphic items and in order to avoid misalignments of the zero-based index.

nUniqueId

Reference that, on return from the method call, will contain the unique identification number of the given graphic item.

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.


GraphicItemVerticalLineAdd method

GraphicItemVerticalLineAdd method

Remarks

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

On the screenshot below you can see a set of vertical 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:

· through code using the GraphicItemHorzPositionSet method
· through the mouse, causing a sequence of WaveAnalyzerLineMoveBegin, WaveAnalyzerLineMoving and WaveAnalyzerLineMoveEnd events to be generated.

During playback of the loaded sound, the WaveAnalyzerLineReached event is generated when playback position reaches the position of the vertical line.

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

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

A vertical line can be removed through the GraphicItemRemove method and hidden or shown through the 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.

Syntax

[Visual Basic]

control.GraphicItemVerticalLineAdd (

strFriendlyName as String,

strDescription as String,

nPositionInMs as Long,

settings as Long

) as Integer

[C++]

short control.GraphicItemVerticalLineAdd (

LPCTSTR strFriendlyName,

LPCTSTR strDescription,

long nPositionInMs,

void *settings

);

Parameter | Description
strFriendlyName | Friendly name of the line. This friendly name can be modified or retrieved at a later time through the GraphicItemNameGet and GraphicItemNameSet methods.
strDescription | Description of the line. This description can be modified or retrieved at a later time through the GraphicItemDescriptionGet and GraphicItemDescriptionSet methods.
nPositionInMs | Position of the line expressed in milliseconds. This position can be modified or retrieved at a later time through the GraphicItemHorzPositionGet and GraphicItemHorzPositionSet methods.
settings | Address of a structure of type WANALYZER_VERTICAL_LINE that contains the settings for the new line. These settings can be modified or retrieved at a later time through the GraphicItemVerticalLineParamsGet and GraphicItemVerticalLineParamsSet methods. By setting this value to 0 the graphic item will be rendered with default setting.

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.


GraphicItemVerticalLineParamsGet method

GraphicItemVerticalLineParamsGet method

Remarks

Obtains parameters of an existing vertical line displayed over the waveform's graphics. These parameters can be modified through the GraphicItemVerticalLineParamsSet method.

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

Syntax

[Visual Basic]

control.GraphicItemVerticalLineParamsGet (

nUniqueId as Integer,

settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemVerticalLineParamsGet (

short nUniqueId,

void *settings

);

Parameter | Description
nUniqueId | Unique identification number assigned to the line by a previous call to the GraphicItemVerticalLineAdd method.
settings | Address of a structure of type WANALYZER_VERTICAL_LINE that receives in output the current settings of the line.

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.


GraphicItemVerticalLineParamsGetEx method

GraphicItemVerticalLineParamsGetEx method

Remarks

Obtains one of the settings for the given vertical line added to the waveform analyzer. Value of single settings can be modified through the GraphicItemVerticalLineParamsSetEx method.

This method is an alternative to the GraphicItemVerticalLineParamsGet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.GraphicItemVerticalLineParamsGetEx (

nUniqueId as Integer,

nParam as short

) as String

[C++]

BSTR control.GraphicItemVerticalLineParamsGetEx (

short nUniqueId,

short nParam

);

Parameter

Description

nUniqueId

Unique identification number assigned to the line by a previous call to the GraphicItemVerticalLineAdd method.

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | color member of the WANALYZER_VERTICAL_LINE data structure
1 | nDashStyle member of the WANALYZER_VERTICAL_LINE data structure
2 | nWidth member of the WANALYZER_VERTICAL_LINE data structure
3 | nTranspFactor member of the WANALYZER_VERTICAL_LINE data structure
4 | nHighCap member of the WANALYZER_VERTICAL_LINE data structure
5 | nLowCap member of the WANALYZER_VERTICAL_LINE data structure
6 | nLowCap member of the WANALYZER_VERTICAL_LINE data structure

Return value

Value

Meaning

Empty string

An error occurred: see the LastError property for further error details or for a list of the possible error values.

Valid string

String containing the value of the requested parameter.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"


GraphicItemVerticalLineParamsSet method

GraphicItemVerticalLineParamsSet method

Remarks

Modifies parameters of an existing vertical line displayed over the waveform's graphics. Current parameters can be obtained through the GraphicItemVerticalLineParamsGet method.

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

Syntax

[Visual Basic]

control.GraphicItemVerticalLineParamsSet (

nUniqueId as Integer,

settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemVerticalLineParamsSet (

short nUniqueId,

void *settings

);

Parameter | Description
nUniqueId | Unique identification number assigned to the line by a previous call to the GraphicItemVerticalLineAdd method.
settings | Address of a structure of type WANALYZER_VERTICAL_LINE that contains the new settings for the line.

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.


GraphicItemVerticalLineParamsSetEx method

GraphicItemVerticalLineParamsSetEx method

Remarks

Modifies one of the settings for the given vertical line added to the waveform analyzer. Value of single settings can be obtained through the GraphicItemVerticalLineParamsGetEx method.

This method is an alternative to the GraphicItemVerticalLineParamsSet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.GraphicItemVerticalLineParamsSetEx (

nUniqueId as Integer,

nParam as short,

strValue as String

) as enumWanErrorCodes

[C++]

short control.GraphicItemVerticalLineParamsSetEx (

short nUniqueId,

short nParam,

LPCTSTR strValue

);

Parameter

Description

nUniqueId

Unique identification number assigned to the line by a previous call to the GraphicItemVerticalLineAdd method.

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | color member of the WANALYZER_VERTICAL_LINE data structure
1 | nDashStyle member of the WANALYZER_VERTICAL_LINE data structure
2 | nWidth member of the WANALYZER_VERTICAL_LINE data structure
3 | nTranspFactor member of the WANALYZER_VERTICAL_LINE data structure
4 | nHighCap member of the WANALYZER_VERTICAL_LINE data structure
5 | nLowCap member of the WANALYZER_VERTICAL_LINE data structure
6 | nLowCap member of the WANALYZER_VERTICAL_LINE data structure

strValue

String representing the numerical value to set: the multimedia engine will manage converting the string into the corresponding numerical value.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"

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.


GraphicItemVertPositionGet method

GraphicItemVertPositionGet method

Remarks

Obtains the current vertical position of the given graphic item. The vertical position can be modified through the GraphicItemVertPositionSet method or through the mouse.

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

Syntax

[Visual Basic]

control.GraphicItemVertPositionGet (

nUniqueId as Integer,

ByRef nPosInPerc as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemVertPositionGet (

short nUniqueId,

long *nPosInPerc

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines

nPosInPerc

Reference that, on return from the method call, will contain the position of the item expressed in percentage of wave amplitude.

May assume values from -100 to 100: a negative value indicates that the line should be drawn over negative waveform peaks.

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.


GraphicItemVertPositionSet method

GraphicItemVertPositionSet method

Remarks

Sets the new vertical position of the given graphic item. The current vertical position can be obtained through the GraphicItemVertPositionGet method.

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

Syntax

[Visual Basic]

control.GraphicItemVertPositionSet (

nUniqueId as Integer,

nPosInPerc as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemVertPositionSet (

short nUniqueId,

long nPosInPerc

);

Parameter

Description

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines

nPosInPerc

The new vertical position of the line expressed in percentage of wave amplitude.

May assume values from -100 to 100: a negative value indicates that the line should be drawn over negative waveform peaks.

In case you should be willing the set the line position based upon a logarithmic scale, you could convert your value in dB to a value in percentage using the following formula:

ValueInPerc = 100 * pow (10, ValueInDB/20);

On the screenshot below you can see 3 lines, 2 on positive waveform peaks, respectively at 70% and 25% of the waveform amplitude, and one on negative waveform peaks at -80% of the waveform amplitude.

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.


GraphicItemWaveRangeAdd method

GraphicItemWaveRangeAdd method

Remarks

Adds a new wave range that will be displayed over the waveform's graphics.

Inside the screenshot below you can see 2 examples of wave ranges, each with its own set of colors. Please note that "wave ranges" are a different concept respect to "waveform selection": you can only have one single "waveform selection", whose positioning can be managed through code or through mouse movement, but you can have multiple "wave ranges" managed through code without any mouse management for changing the positioning.

This wave range can be manually moved on the screen through code using the GraphicItemHorzPositionSet method.

During playback of the loaded sound, the WaveAnalyzerWaveRangeReached event is generated when playback position reaches the start position of the wave range and the WaveAnalyzerWaveRangeLeaved event is generated when playback position leaves the end position of the wave range.

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

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

A wave range can be removed through the GraphicItemRemove method and hidden or shown through the 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.

Syntax

[Visual Basic]

control.GraphicItemWaveRangeAdd (

strFriendlyName as String,

strDescription as String,

nStartPosInMs as Long,

nEndPosInMs as Long,

settings as Long

) as Integer

[C++]

short control.GraphicItemWaveRangeAdd (

LPCTSTR strFriendlyName,

LPCTSTR strDescription,

long nStartPosInMs,

long nEndPosInMs,

void *settings

);

Parameter | Description
strFriendlyName | Friendly name of the wave range. This friendly name can be modified or retrieved at a later time through the GraphicItemNameGet and GraphicItemNameSet methods.
strDescription | Description of the wave range. This description can be modified or retrieved at a later time through the GraphicItemDescriptionGet and GraphicItemDescriptionSet methods.
nStartPosInMs | Start position expressed in milliseconds. This position can be modified or retrieved at a later time through the GraphicItemHorzPositionGet and GraphicItemHorzPositionSet methods.
nEndPosInMs | End position expressed in milliseconds This position can be modified or retrieved at a later time through the GraphicItemHorzPositionGet and GraphicItemHorzPositionSet methods.
settings | Address of a structure of type WANALYZER_WAVE_RANGE that contains the settings for the new wave range. These settings can be modified or retrieved at a later time through the GraphicItemWaveRangeParamsSet and GraphicItemWaveRangeParamsGet methods. By setting this value to 0 the graphic item will be rendered with default setting.

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 wave range.


GraphicItemWaveRangeParamsGet method

GraphicItemWaveRangeParamsGet method

Remarks

Obtains settings of an existing wave range displayed over the waveform's graphics. These settings can be modified through the GraphicItemWaveRangeParamsSet method.

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

Syntax

[Visual Basic]

control.GraphicItemWaveRangeParamsGet (

nUniqueId as Integer,

settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemWaveRangeParamsGet (

short nUniqueId,

void *settings

);

Parameter | Description
nUniqueId | Unique identification number assigned to the wave range by a previous call to the GraphicItemWaveRangeAdd method.
settings | Address of a structure of type WANALYZER_WAVE_RANGE that receives in output the current settings of the wave range.

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.


GraphicItemWaveRangeParamsGetEx method

GraphicItemWaveRangeParamsGetEx method

Remarks

Obtains the value of one of the settings for the given wave range added to the waveform analyzer. Value of single settings can be modified through the GraphicItemWaveRangeParamsSetEx method.

This method is an alternative to the GraphicItemWaveRangeParamsGet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.GraphicItemWaveRangeParamsGetEx (

nUniqueId as Integer,

nParam as short

) as String

[C++]

BSTR control.GraphicItemWaveRangeParamsGetEx (

short nUniqueId,

short nParam

);

Parameter

Description

nUniqueId

Unique identification number assigned to the wave range by a previous call to the GraphicItemWaveRangeAdd method.

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | colorBack member of the WANALYZER_WAVE_RANGE data structure
1 | colorWaveLinePeak member of the WANALYZER_WAVE_RANGE data structure
2 | colorWaveLinePeak member of the WANALYZER_WAVE_RANGE data structure

Return value

Value

Meaning

Empty string

An error occurred: see the LastError property for further error details or for a list of the possible error values.

Valid string

String containing the value of the requested parameter.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"


GraphicItemWaveRangeParamsSet method

GraphicItemWaveRangeParamsSet method

Remarks

Modifies settings of an existing wave range displayed over the waveform's graphics. The current settings can be retrieved through the GraphicItemWaveRangeParamsGet method.

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

Syntax

[Visual Basic]

control.GraphicItemWaveRangeParamsSet (

nUniqueId as Integer,

settings as Long

) as enumWanErrorCodes

[C++]

short control.GraphicItemWaveRangeParamsSet (

short nUniqueId,

void *settings

);

Parameter | Description
nUniqueId | Unique identification number assigned to the wave range by a previous call to the GraphicItemWaveRangeAdd method.
settings | Address of a structure of type WANALYZER_WAVE_RANGE that contains the new settings for the wave range.

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.


GraphicItemWaveRangeParamsSetEx method

GraphicItemWaveRangeParamsSetEx method

Remarks

Modifies one of the settings for the given wave range added to the waveform analyzer. Value of single settings can be obtained through the GraphicItemWaveRangeParamsGetEx method.

This method is an alternative to the GraphicItemWaveRangeParamsSet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.GraphicItemWaveRangeParamsSetEx (

nUniqueId as Integer,

nParam as short,

strValue as String

) as enumWanErrorCodes

[C++]

short control.GraphicItemWaveRangeParamsSetEx (

short nUniqueId,

short nParam,

LPCTSTR strValue

);

Parameter

Description

nUniqueId

Unique identification number assigned to the wave range by a previous call to the GraphicItemWaveRangeAdd method.

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | colorBack member of the WANALYZER_WAVE_RANGE data structure
1 | colorWaveLinePeak member of the WANALYZER_WAVE_RANGE data structure
2 | colorWaveLinePeak member of the WANALYZER_WAVE_RANGE data structure

strValue

String representing the numerical value to set: the multimedia engine will manage converting the string into the corresponding numerical value.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"

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.


GraphicItemsLoad method

GraphicItemsLoad method

Remarks

Loads and adds to the waveform analyzer graphic items contained inside the given XML file. In case the XML file should be contained inside a memory stream, you could use the GraphicItemsLoadFromMemory method.

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

Syntax

[Visual Basic]

control.GraphicItemsLoad (

strPathname as String

) as enumWanErrorCodes

[C++]

short control.GraphicItemsLoad (

LPCTSTR strPathname

);

Parameter | Description
strPathname | String containing the absolute pathname of the source file.

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.


GraphicItemsLoadFromMemory method

GraphicItemsLoadFromMemory method

Remarks

Loads graphic items from a XML memory stream and add them to the waveform analyzer.

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

Syntax

[Visual Basic]

control.GraphicItemsLoadFromMemory (

pBuffer as variant,

nBufferLength as long

) as enumWanErrorCodes

[C++]

short control.GraphicItemsLoadFromMemory (

const VARIANT FAR& pBuffer,

long nBufferLength

);

Parameter | Description
pBuffer | Input buffer containing the graphic items in XML format.
nBufferLength | Length of the input buffer expressed in bytes

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.


GraphicItemsMouseMoveEnable method

GraphicItemsMouseMoveEnable method

Remarks

Enables/disables the possibility to move graphic items through the mouse.

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

Syntax

[Visual Basic]

control.GraphicItemsMouseMoveEnable (

nGraphicItemsMask as enumGraphicItemMaskValues,

bEnable as enumBoolean

) as enumWanErrorCodes

[C++]

short control.GraphicItemsMouseMoveEnable (

short nGraphicItemsMask,

short bEnable

);

Parameter

Description

nGraphicItemsMask

Combination of values determining the mask of graphic items whose movement through mouse we want enable or disable.

Can be a combination of the following values:

Mnemonic value | Value | Meaning
MASK_GRAPHIC_ITEM_VERTICAL_LINES | 1 | The setting is applied to vertical lines
MASK_GRAPHIC_ITEM_HORIZONTAL_LINES | 2 | The setting is applied to horizontal lines

bEnable

Boolean value that specifies if mouse movement of the the graphic item must be enabled or disabled.

Supported values are the following:

Value | Meaning
false | Moving of given graphic items through the mouse is disabled
true (default) | Moving of given graphic items through the mouse is enabled

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.


GraphicItemsSave method

GraphicItemsSave method

Remarks

Saves into the given XML file all of the graphic items already added to the waveform analyzer.

The XML file is normally saved in ANSI format: in case one or more of the saved strings should contain UNICODE characters, the file would be automatically saved in UTF-8 format.

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

Syntax

[Visual Basic]

control.GraphicItemsSave (

strPathname as String

) as enumWanErrorCodes

[C++]

short control.GraphicItemsSave (

LPCTSTR strPathname

);

Parameter | Description
strPathname | String containing the absolute pathname of the destination file.

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.


GraphicItemsTypeCountGet method

GraphicItemsTypeCountGet method

Remarks

Obtains the total number of graphic items of a given type added to the waveform analyzer.

It's important to note that, after eventually removing graphic items through the GraphicItemRemove method, you will have to perform a new call to the GraphicItemsCountGet in order to have an update enumeration of graphic items and in order to avoid misalignments of the zero-based index when accessing the unique identification number of the graphic item through the GraphicItemUniqueIdGet method.

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

Syntax

[Visual Basic]

control.GraphicItemsTypeCountGet (

nType as enumGraphicItemType,

ByRef nCount as Integer

) as enumWanErrorCodes

[C++]

short control.GraphicItemsTypeCountGet (

short nType,

short *nCount

);

Parameter

Description

nType

The type of graphic items.

Supported values are the following:

Mnemonic constant | Numeric value | Meaning
GRAPHIC_ITEM_VERTICAL_LINE | 0 | Vertical lines
GRAPHIC_ITEM_HORIZONTAL_LINE | 1 | Horizontal lines
GRAPHIC_ITEM_WAVE_RANGE | 2 | Wave ranges

nCount

Reference that, on return from the method call, will contain the total number of graphic items of the given type

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.


GraphicItemsTypeRemove method

GraphicItemsTypeRemove method

Remarks

Removes all of the graphic items of a given type. In order to remove all types of graphic items at once, use the GraphicItemRemove method with parameter -1.

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

Syntax

[Visual Basic]

control.GraphicItemsTypeRemove (

nType as enumGraphicItemType

) as enumWanErrorCodes

[C++]

short control.GraphicItemsTypeRemove (

short nType

);

Parameter

Description

nType

The type of graphic items.

Supported values are the following:

Mnemonic constant | Numeric value | Meaning
GRAPHIC_ITEM_VERTICAL_LINE | 0 | Vertical line
GRAPHIC_ITEM_HORIZONTAL_LINE | 1 | Horizontal line
GRAPHIC_ITEM_WAVE_RANGE | 2 | Wave range

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.


GraphicItemsTypeShow method

GraphicItemsTypeShow method

Remarks

Shows/hides all of the graphic items of a given type.

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

Syntax

[Visual Basic]

control.GraphicItemsTypeShow (

nType as enumGraphicItemType,

bShow as enumBoolean

) as enumWanErrorCodes

[C++]

short control.GraphicItemsTypeShow (

short nType,

short bShow

);

Parameter

Description

nType

The type of graphic items.

Supported values are the following:

Mnemonic constant | Numeric value | Meaning
GRAPHIC_ITEM_VERTICAL_LINE | 0 | Vertical line
GRAPHIC_ITEM_HORIZONTAL_LINE | 1 | Horizontal line
GRAPHIC_ITEM_WAVE_RANGE | 2 | Wave range

bShow

Boolean value that specifies if the graphic items of the given type must be shown or hidden.

Supported values are the following:

Value | Meaning
false | Hides the graphic items
true | Shows the graphic items

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.


SetBackPictureFromHandle method

SetBackPictureFromHandle method

Remarks

Sets a background picture from an existing bitmap handle.

Syntax

[Visual Basic]

control.SetBackPictureFromHandle (

hBitmap as OLE_HANDLE,

nMode as enumBitmapModes

) as enumWanErrorCodes

[C++]

short control.SetBackPictureFromHandle (

OLE_HANDLE hBitmap,

short nMode

);

Parameter

Description

hBitmap

Handle (HBITMAP) of the bitmap to apply. If this parameter is set to 0 an eventual picture set through a previous call to this method will be reset.

nMode

Bitmap mode.

Supported values are the following:

Mnemonic constant | Value | Meaning
BITMAP_MODE_TOP_LEFT | 0 | Bitmap will be drawn in top-left position on the destination rectangle
BITMAP_MODE_CENTER | 1 | Bitmap will be drawn in centered position on the destination rectangle
BITMAP_MODE_STRETCH | 2 | Bitmap will be stretched in order to fit the destination rectangle
BITMAP_MODE_TILE | 3 | Bitmap will be tiled in order to fill the destination rectangle

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


SetBackPictureFromFile method

SetBackPictureFromFile method

Remarks

Sets a background picture from a graphic file.

Syntax

[Visual Basic]

control.SetBackPictureFromFile (

strPathname as String,

nMode as enumBitmapModes

) as enumWanErrorCodes

[C++]

short control.SetBackPictureFromFile (

LPCTSTR strPathname,

short nMode

);

Parameter

Description

strPathname

Absolute pathname of the picture file to load. Accepted graphic formats are BMP, JPEG, GIF, TIFF and PNG.

An empty pathname will reset an eventual picture set through a previous call to this method.

nMode

Bitmap mode.

Supported values are the following:

Mnemonic constant | Value | Meaning
BITMAP_MODE_TOP_LEFT | 0 | Bitmap will be drawn in top-left position on the destination rectangle
BITMAP_MODE_CENTER | 1 | Bitmap will be drawn in centered position on the destination rectangle
BITMAP_MODE_STRETCH | 2 | Bitmap will be stretched in order to fit the destination rectangle
BITMAP_MODE_TILE | 3 | Bitmap will be tiled in order to fill the destination rectangle

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


SettingsLoad method

SettingsLoad method

Remarks

Loads graphic settings of the waveform analyzer from a XML file previously saved through the SettingsSave method.

The XML file contains all settings stored inside the various waveform analyzer data structures: WANALYZER_GENERAL_SETTINGS, WANALYZER_RULERS_SETTINGS, WANALYZER_SCROLLBARS_SETTINGS and WANALYZER_WAVEFORM_SETTINGS.

Syntax

[Visual Basic]

control.SettingsLoad (

strPathname as string

) as enumWanErrorCodes

[C++]

short control.SettingsLoad (

string strPathname

);

Parameter | Description
strPathname | String containing the absolute pathname of the source file.

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


SettingsLoadFromMemory method

SettingsLoadFromMemory method

Remarks

Loads graphic settings of the waveform analyzer from a memory buffer containing a XML file previously saved through the SettingsSave method.

The XML file contains all settings stored inside the various waveform analyzer data structures: WANALYZER_GENERAL_SETTINGS, WANALYZER_RULERS_SETTINGS, WANALYZER_SCROLLBARS_SETTINGS and WANALYZER_WAVEFORM_SETTINGS.

Syntax

[Visual Basic]

control.SettingsLoadFromMemory (

pBuffer as variant,

nBufferLength as long

) as enumWanErrorCodes

[C++]

short control.SettingsLoadFromMemory (

const VARIANT FAR& pBuffer,

long nBufferLength

);

Parameter | Description
pBuffer | Input buffer containing the waveform analyzer settings in XML format.
nBufferLength | Length of the input buffer expressed in bytes

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.


SettingsSave method

SettingsSave method

Remarks

Saves graphic settings of the waveform analyzer into a XML file. The saved XML file can be retrieved at a later time through the SettingsLoad method.

The XML file will contain all settings stored inside the various waveform analyzer data structures: WANALYZER_GENERAL_SETTINGS, WANALYZER_RULERS_SETTINGS, WANALYZER_SCROLLBARS_SETTINGS and WANALYZER_WAVEFORM_SETTINGS.

Syntax

[Visual Basic]

control.SettingsSave (

strPathname as string

) as enumWanErrorCodes

[C++]

short control.SettingsSave (

string strPathname

);

Parameter | Description
strPathname | String containing the absolute pathname of the destination file.

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


SettingsGeneralGet method

SettingsGeneralGet method

Remarks

Retrieves the current general settings for the waveform analyzer. Settings can be modified through the SettingsGeneralSet method.

Syntax

[Visual Basic]

control.SettingsGeneralGet (

ByRef settings as Long

) as enumWanErrorCodes

[C++]

short control.SettingsGeneralGet (

void *settings

);

Parameter | Description
settings | Address of a structure of type WANALYZER_GENERAL_SETTINGS that, on return from the method call, will contain the current general settings.

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.


SettingsGeneralSet method

SettingsGeneralSet method

Remarks

Sets new general settings for the waveform analyzer. Current settings can be obtained through the SettingsGeneralGet method.

Syntax

[Visual Basic]

control.SettingsGeneralSet (

settings as Long

) as enumWanErrorCodes

[C++]

short control.SettingsGeneralSet (

void *settings

);

Parameter | Description
settings | Address of a structure of type WANALYZER_GENERAL_SETTINGS that contains the new general settings.

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.


SettingsGeneralParamGet method

SettingsGeneralParamGet method

Remarks

Retrieves one of the current general graphical settings for the waveform analyzer. Single settings can be modified through the SettingsGeneralParamSet method.

This method is an alternative to the SettingsGeneralGet method and is provided with the purpose of allowing single settings retrieval when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.SettingsGeneralParamGet (

nParam as short

) as String

[C++]

BSTR control.SettingsGeneralParamGet (

short nParam

);

Parameter

Description

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | bAppearance3d member of the WANALYZER_GENERAL_SETTINGS data structure
1 | nResolution member of the WANALYZER_GENERAL_SETTINGS data structure
2 | fHorizontalZoomFactor member of the WANALYZER_GENERAL_SETTINGS data structure
3 | fVerticalZoomFactor member of the WANALYZER_GENERAL_SETTINGS data structure
4 | nPositionLineWidth member of the WANALYZER_GENERAL_SETTINGS data structure
5 | nPositionLineDashStyle member of the WANALYZER_GENERAL_SETTINGS data structure
6 | colorPositionLine member of the WANALYZER_GENERAL_SETTINGS data structure
7 | bPlaybackLineVisible member of the WANALYZER_GENERAL_SETTINGS data structure
8 | nPlaybackLineWidth member of the WANALYZER_GENERAL_SETTINGS data structure
9 | nPlaybackLineDashStyle member of the WANALYZER_GENERAL_SETTINGS data structure
10 | colorPlaybackLine member of the WANALYZER_GENERAL_SETTINGS data structure
11 | nPositionLineHighCap member of the WANALYZER_GENERAL_SETTINGS data structure
12 | nPositionLineLowCap member of the WANALYZER_GENERAL_SETTINGS data structure
13 | nPositionLineDashCap member of the WANALYZER_GENERAL_SETTINGS data structure
14 | nPositionLineTranspFactor member of the WANALYZER_GENERAL_SETTINGS data structure
15 | nPlaybackLineHighCap member of the WANALYZER_GENERAL_SETTINGS data structure
16 | nPlaybackLineLowCap member of the WANALYZER_GENERAL_SETTINGS data structure
17 | nPlaybackLineDashCap member of the WANALYZER_GENERAL_SETTINGS data structure
18 | nPlaybackLineTranspFactor member of the WANALYZER_GENERAL_SETTINGS data structure
19 | VerticalLinesOnTimeRuler member of the WANALYZER_GENERAL_SETTINGS data structure
20 | bAutoRefresh member of the WANALYZER_GENERAL_SETTINGS data structure

Return value

Value

Meaning

Empty string

An error occurred: see the LastError property for further error details or for a list of the possible error values.

Valid string

String containing the value of the requested parameter.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"


SettingsGeneralParamSet method

SettingsGeneralParamSet method

Remarks

Sets one of the general settings for the waveform analyzer. Value of single settings can be obtained through the SettingsGeneralParamGet method.

This method is an alternative to the SettingsGeneralSet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.SettingsGeneralParamSet (

nParam as short,

strValue as String

) as String

[C++]

BSTR control.SettingsGeneralParamSet (

short nParam,

LPCTSTR strValue

);

Parameter

Description

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | bAppearance3d member of the WANALYZER_GENERAL_SETTINGS data structure
1 | nResolution member of the WANALYZER_GENERAL_SETTINGS data structure
2 | fHorizontalZoomFactor member of the WANALYZER_GENERAL_SETTINGS data structure
3 | fVerticalZoomFactor member of the WANALYZER_GENERAL_SETTINGS data structure
4 | nPositionLineWidth member of the WANALYZER_GENERAL_SETTINGS data structure
5 | nPositionLineDashStyle member of the WANALYZER_GENERAL_SETTINGS data structure
6 | colorPositionLine member of the WANALYZER_GENERAL_SETTINGS data structure
7 | bPlaybackLineVisible member of the WANALYZER_GENERAL_SETTINGS data structure
8 | nPlaybackLineWidth member of the WANALYZER_GENERAL_SETTINGS data structure
9 | nPlaybackLineDashStyle member of the WANALYZER_GENERAL_SETTINGS data structure
10 | colorPlaybackLine member of the WANALYZER_GENERAL_SETTINGS data structure
11 | nPositionLineHighCap member of the WANALYZER_GENERAL_SETTINGS data structure
12 | nPositionLineLowCap member of the WANALYZER_GENERAL_SETTINGS data structure
13 | nPositionLineDashCap member of the WANALYZER_GENERAL_SETTINGS data structure
14 | nPositionLineTranspFactor member of the WANALYZER_GENERAL_SETTINGS data structure
15 | nPlaybackLineHighCap member of the WANALYZER_GENERAL_SETTINGS data structure
16 | nPlaybackLineLowCap member of the WANALYZER_GENERAL_SETTINGS data structure
17 | nPlaybackLineDashCap member of the WANALYZER_GENERAL_SETTINGS data structure
18 | nPlaybackLineTranspFactor member of the WANALYZER_GENERAL_SETTINGS data structure
19 | VerticalLinesOnTimeRuler member of the WANALYZER_GENERAL_SETTINGS data structure
20 | bAutoRefresh member of the WANALYZER_GENERAL_SETTINGS data structure

strValue

String representing the numerical value to set: the multimedia engine will manage converting the string into the corresponding numerical value.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"

Return value

Value | Meaning
Empty string | An error occurred: see the LastError property for further error details or for a list of the possible error values.
Valid string | String containing the value of the requested parameter


SettingsReset method

SettingsReset method

Remarks

Resets current settings of the waveform analyzer to factory defaults.

Syntax

[Visual Basic]

control.SettingsReset (

) as enumWanErrorCodes

[C++]

short control.SettingsReset (

);

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


SettingsRulersGet method

SettingsRulersGet method

Remarks

Retrieves the rulers current settings for the waveform analyzer. Settings can be modified through the SettingsRulersSet method.

Syntax

[Visual Basic]

control.SettingsRulersGet (

settings as Long,

hFontText as OLE_HANDLE

) as enumWanErrorCodes

[C++]

short control.SettingsRulersGet (

void *settings,

OLE_HANDLE *hFontText

);

Parameter

Description

settings

Address of a structure of type WANALYZER_RULERS_SETTINGS that, on return from the method call, will contain the rulers current settings.

hFontText

Reference that, on return from the method call, will contain the handle to a copy of the font used for rendering the text of ruler's ticks.

In order to avoid leaks of system resource, when the font is no more needed the container application should free it by calling the DeleteObject function of the Windows API.

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.


SettingsRulersSet method

SettingsRulersSet method

Remarks

Sets rulers new settings for the waveform analyzer. Current settings can be obtained through the SettingsRulersGet method.

Syntax

[Visual Basic]

control.SettingsRulersSet (

settings as Long,

hFontText as OLE_HANDLE

) as enumWanErrorCodes

[C++]

short control.SettingsRulersSet (

WANALYZER_RULERS_SETTINGS settings,

OLE_HANDLE hFontText

);

Parameter | Description
settings | Address of a structure of type WANALYZER_RULERS_SETTINGS that contains the rulers new settings.
hFontText | The handle to the font that needs to be used for rendering the text of ruler's ticks. The component will make a copy of this font so, when the method's call returns to the caller, you can remove this font from system resources by calling the DeleteObject function of the Windows API.

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.


SettingsRulersParamGet method

SettingsRulersParamGet method

Remarks

Retrieves one of the current rulers settings for the waveform analyzer. Single settings can be modified through the SettingsRulersParamSet method.

This method is an alternative to the SettingsRulersGet method and is provided with the purpose of allowing single settings retrieval when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.SettingsRulersParamGet (

nParam as short

) as String

[C++]

BSTR control.SettingsRulersParamGet (

short nParam

);

Parameter

Description

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | nAmplitudeScale member of the WANALYZER_RULERS_SETTINGS data structure
1 | bVisibleLeft member of the WANALYZER_RULERS_SETTINGS data structure
2 | bTicksLeft member of the WANALYZER_RULERS_SETTINGS data structure
3 | bVisibleRight member of the WANALYZER_RULERS_SETTINGS data structure
4 | bTicksRight member of the WANALYZER_RULERS_SETTINGS data structure
5 | bVisibleTop member of the WANALYZER_RULERS_SETTINGS data structure
6 | bTicksTop member of the WANALYZER_RULERS_SETTINGS data structure
7 | bVisibleBottom member of the WANALYZER_RULERS_SETTINGS data structure
8 | bTicksBottom member of the WANALYZER_RULERS_SETTINGS data structure
9 | colorBackground member of the WANALYZER_RULERS_SETTINGS data structure
10 | colorTicks member of the WANALYZER_RULERS_SETTINGS data structure
11 | colorText member of the WANALYZER_RULERS_SETTINGS data structure
12 | nTopRulerHeightInPix member of the WANALYZER_RULERS_SETTINGS data structure
13 | nBottomRulerHeightInPix member of the WANALYZER_RULERS_SETTINGS data structure
14 | nVertRulerWidthInPix member of the WANALYZER_RULERS_SETTINGS data structure
15 | fTimeTicksFrequencyInPix member of the WANALYZER_RULERS_SETTINGS data structure

Return value

Value

Meaning

Empty string

An error occurred: see the LastError property for further error details or for a list of the possible error values.

Valid string

String containing the value of the requested parameter.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"


SettingsRulersParamSet method

SettingsRulersParamSet method

Remarks

Sets one of the rulers settings for the waveform analyzer. Value of single settings can be obtained through the SettingsRulersParamGet method.

This method is an alternative to the SettingsRulersSet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.SettingsRulersParamSet (

nParam as short,

strValue as String

) as String

[C++]

BSTR control.SettingsRulersParamSet (

short nParam,

LPCTSTR strValue

);

Parameter

Description

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | nAmplitudeScale member of the WANALYZER_RULERS_SETTINGS data structure
1 | bVisibleLeft member of the WANALYZER_RULERS_SETTINGS data structure
2 | bTicksLeft member of the WANALYZER_RULERS_SETTINGS data structure
3 | bVisibleRight member of the WANALYZER_RULERS_SETTINGS data structure
4 | bTicksRight member of the WANALYZER_RULERS_SETTINGS data structure
5 | bVisibleTop member of the WANALYZER_RULERS_SETTINGS data structure
6 | bTicksTop member of the WANALYZER_RULERS_SETTINGS data structure
7 | bVisibleBottom member of the WANALYZER_RULERS_SETTINGS data structure
8 | bTicksBottom member of the WANALYZER_RULERS_SETTINGS data structure
9 | colorBackground member of the WANALYZER_RULERS_SETTINGS data structure
10 | colorTicks member of the WANALYZER_RULERS_SETTINGS data structure
11 | colorText member of the WANALYZER_RULERS_SETTINGS data structure
12 | nTopRulerHeightInPix member of the WANALYZER_RULERS_SETTINGS data structure
13 | nBottomRulerHeightInPix member of the WANALYZER_RULERS_SETTINGS data structure
14 | nVertRulerWidthInPix member of the WANALYZER_RULERS_SETTINGS data structure
15 | fTimeTicksFrequencyInPix member of the WANALYZER_RULERS_SETTINGS data structure

strValue

String representing the numerical value to set: the multimedia engine will manage converting the string into the corresponding numerical value.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"

Return value

Value | Meaning
Empty string | An error occurred: see the LastError property for further error details or for a list of the possible error values.
Valid string | String containing the value of the requested parameter


SettingsRulersTimeOffsetSet method

SettingsRulersTimeOffsetSet method

Remarks

Modifies the time offset for time rulers.

After calling this method, time rulers will display position 0:00.000 at the given offset and earlier positions will be displayed as negative values,

Syntax

[Visual Basic]

control.SettingsRulersTimeOffsetSet (

nTimeOffsetInMs as Long

) as enumWanErrorCodes

[C++]

short control.SettingsRulersTimeOffsetSet (

long nTimeOffsetInMs

);

Parameter | Description
nTimeOffsetInMs | Number representing the offset expressed in milliseconds. By default this value is set to 0.

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.


SettingsScrollbarsGet method

SettingsScrollbarsGet method

Remarks

Retrieves the scrollbars current settings for the waveform analyzer. Settings can be modified through the SettingsScrollbarsSet method.

Syntax

[Visual Basic]

control.SettingsScrollbarsGet (

settings as Long

) as enumWanErrorCodes

[C++]

short control.SettingsScrollbarsGet (

void *settings

);

Parameter | Description
settings | Address of a structure of type WANALYZER_SCROLLBARS_SETTINGS that, on return from the method call, will contain the scrollbars current settings.

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.


SettingsScrollbarsSet method

SettingsScrollbarsSet method

Remarks

Sets scrollbars new settings for the waveform analyzer. Current settings can be obtained through the SettingsScrollbarsGet method.

Syntax

[Visual Basic]

Public Function SettingsScrollbarsSet (

settings as Long

) as enumWanErrorCodes

[C++]

public: enumWanErrorCodes SettingsScrollbarsSet (

void *settings

);

Parameter | Description
settings | Address of a structure of type WANALYZER_SCROLLBARS_SETTINGS that contains the scrollbars new settings.

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.


SettingsScrollbarsParamGet method

SettingsScrollbarsParamGet method

Remarks

Retrieves one of the current general graphical settings for the waveform analyzer. Single settings can be modified through the SettingsScrollbarsParamSet method.

This method is an alternative to the SettingsScrollbarsGet method and is provided with the purpose of allowing single settings retrieval when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.SettingsScrollbarsParamGet (

nParam as short

) as String

[C++]

BSTR control.SettingsScrollbarsParamGet (

short nParam

);

Parameter

Description

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | nHeightInPixels member of the WANALYZER_SCROLLBARS_SETTINGS data structure
1 | nType member of the WANALYZER_SCROLLBARS_SETTINGS data structure
2 | nGraphicItemsMask member of the WANALYZER_SCROLLBARS_SETTINGS data structure
3 | bVisibleTop member of the WANALYZER_SCROLLBARS_SETTINGS data structure
4 | bVisibleBottom member of the WANALYZER_SCROLLBARS_SETTINGS data structure
5 | colorBackground member of the WANALYZER_SCROLLBARS_SETTINGS data structure
6 | colorThumb member of the WANALYZER_SCROLLBARS_SETTINGS data structure
7 | colorVisibleRange member of the WANALYZER_SCROLLBARS_SETTINGS data structure
8 | nVisibleRangeType member of the WANALYZER_SCROLLBARS_SETTINGS data structure
9 | nVisibleRangeTranspGlassFactor member of the WANALYZER_SCROLLBARS_SETTINGS data structure
10 | nVisibleRangeLinesWidth member of the WANALYZER_SCROLLBARS_SETTINGS data structure
11 | bEnabledDuringPlayback member of the WANALYZER_SCROLLBARS_SETTINGS data structure
12 | nTransparentGlassType member of the WANALYZER_SCROLLBARS_SETTINGS data structure
13 | nTransparentGlassPos3D member of the WANALYZER_SCROLLBARS_SETTINGS data structure
14 | bTransparentGlassInvert3D member of the WANALYZER_SCROLLBARS_SETTINGS data structure

Return value

Value

Meaning

Empty string

An error occurred: see the LastError property for further error details or for a list of the possible error values.

Valid string

String containing the value of the requested parameter.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"


SettingsScrollbarsParamSet method

SettingsScrollbarsParamSet method

Remarks

Sets one of the scrollbars settings for the waveform analyzer. Value of single settings can be obtained through the SettingsScrollbarsParamGet method.

This method is an alternative to the SettingsScrollbarsGet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.SettingsScrollbarsParamSet (

nParam as short,

strValue as String

) as String

[C++]

BSTR control.SettingsScrollbarsParamSet (

short nParam,

LPCTSTR strValue

);

Parameter

Description

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | nHeightInPixels member of the WANALYZER_SCROLLBARS_SETTINGS data structure
1 | nType member of the WANALYZER_SCROLLBARS_SETTINGS data structure
2 | nGraphicItemsMask member of the WANALYZER_SCROLLBARS_SETTINGS data structure
3 | bVisibleTop member of the WANALYZER_SCROLLBARS_SETTINGS data structure
4 | bVisibleBottom member of the WANALYZER_SCROLLBARS_SETTINGS data structure
5 | colorBackground member of the WANALYZER_SCROLLBARS_SETTINGS data structure
6 | colorThumb member of the WANALYZER_SCROLLBARS_SETTINGS data structure
7 | colorVisibleRange member of the WANALYZER_SCROLLBARS_SETTINGS data structure
8 | nVisibleRangeType member of the WANALYZER_SCROLLBARS_SETTINGS data structure
9 | nVisibleRangeTranspGlassFactor member of the WANALYZER_SCROLLBARS_SETTINGS data structure
10 | nVisibleRangeLinesWidth member of the WANALYZER_SCROLLBARS_SETTINGS data structure
11 | bEnabledDuringPlayback member of the WANALYZER_SCROLLBARS_SETTINGS data structure
12 | nTransparentGlassType member of the WANALYZER_SCROLLBARS_SETTINGS data structure
13 | nTransparentGlassPos3D member of the WANALYZER_SCROLLBARS_SETTINGS data structure
14 | bTransparentGlassInvert3D member of the WANALYZER_SCROLLBARS_SETTINGS data structure

strValue

String representing the numerical value to set: the multimedia engine will manage converting the string into the corresponding numerical value.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"

Return value

Value | Meaning
Empty string | An error occurred: see the LastError property for further error details or for a list of the possible error values.
Valid string | String containing the value of the requested parameter


SettingsWaveGet method

SettingsWaveGet method

Remarks

Retrieves the current waveform rendering settings for the waveform analyzer. Settings can be modified through the SettingsWaveSet method.

Syntax

[Visual Basic]

control.SettingsWaveGet (

settings as Long

) as enumWanErrorCodes

[C++]

short control.SettingsWaveGet (

void *settings

);

Parameter | Description
settings | Address of a structure of type WANALYZER_WAVEFORM_SETTINGS that, on return from the method call, will contain the waveform rendering current settings.

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.


SettingsWaveSet method

SettingsWaveSet method

Remarks

Sets waveform rendering new settings for the waveform analyzer. Current settings can be obtained through the SettingsWaveGet method.

Syntax

[Visual Basic]

short control.SettingsWaveSet (

settings as Long

) as enumWanErrorCodes

[C++]

short control.SettingsWaveSet (

void *settings

);

Parameter | Description
settings | Address of a structure of type WANALYZER_WAVEFORM_SETTINGS that contains the waveform rendering new settings.

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.


SettingsWaveParamGet method

SettingsWaveParamGet method

Remarks

Retrieves one of the current waveform rendering settings for the waveform analyzer. Single settings can be modified through the SettingsWaveParamSet method.

This method is an alternative to the SettingsWaveGet method and is provided with the purpose of allowing single settings retrieval when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.SettingsWaveParamGet (

nParam as short

) as String

[C++]

BSTR control.SettingsWaveParamGet (

short nParam

);

Parameter

Description

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | nStereoVisualizationMode member of the WANALYZER_WAVEFORM_SETTINGS data structure
1 | colorWaveLinePeak member of the WANALYZER_WAVEFORM_SETTINGS data structure
2 | colorWaveLineCenter member of the WANALYZER_WAVEFORM_SETTINGS data structure
3 | nWaveLineIntensityFactor member of the WANALYZER_WAVEFORM_SETTINGS data structure
4 | colorWaveBackground member of the WANALYZER_WAVEFORM_SETTINGS data structure
5 | bUseHalfColorsForPeaks member of the WANALYZER_WAVEFORM_SETTINGS data structure
6 | nSelectionMode member of the WANALYZER_WAVEFORM_SETTINGS data structure
7 | colorWaveLineSelPeak member of the WANALYZER_WAVEFORM_SETTINGS data structure
8 | colorWaveLineSelCenter member of the WANALYZER_WAVEFORM_SETTINGS data structure
9 | colorWaveSelBackground member of the WANALYZER_WAVEFORM_SETTINGS data structure
10 | colorTransparentGlass member of the WANALYZER_WAVEFORM_SETTINGS data structure
11 | nTransparentGlassFactor member of the WANALYZER_WAVEFORM_SETTINGS data structure
12 | colorVolumeLevelLine member of the WANALYZER_WAVEFORM_SETTINGS data structure
13 | colorTimeLine member of the WANALYZER_WAVEFORM_SETTINGS data structure
14 | nTransparentGlassType member of the WANALYZER_WAVEFORM_SETTINGS data structure
15 | nTransparentGlassPos3D member of the WANALYZER_WAVEFORM_SETTINGS data structure
16 | bTransparentGlassInvert3D member of the WANALYZER_WAVEFORM_SETTINGS data structure
17 | bDrawLinesOverWave member of the WANALYZER_WAVEFORM_SETTINGS data structure

Return value

Value

Meaning

Empty string

An error occurred: see the LastError property for further error details or for a list of the possible error values.

Valid string

String containing the value of the requested parameter.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"


SettingsWaveParamSet method

SettingsWaveParamSet method

Remarks

Sets one of the general settings for the waveform analyzer. Value of single settings can be obtained through the SettingsWaveParamGet method.

This method is an alternative to the SettingsWaveSet method and is provided with the purpose of allowing single settings modifications when dealing with languages like JavaScript where data structures are not easy to implement.

Syntax

[Visual Basic]

control.SettingsWaveParamSet (

nParam as short,

strValue as String

) as String

[C++]

BSTR control.SettingsWaveParamSet (

short nParam,

LPCTSTR strValue

);

Parameter

Description

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Value | Meaning
0 | nStereoVisualizationMode member of the WANALYZER_WAVEFORM_SETTINGS data structure
1 | colorWaveLinePeak member of the WANALYZER_WAVEFORM_SETTINGS data structure
2 | colorWaveLineCenter member of the WANALYZER_WAVEFORM_SETTINGS data structure
3 | nWaveLineIntensityFactor member of the WANALYZER_WAVEFORM_SETTINGS data structure
4 | colorWaveBackground member of the WANALYZER_WAVEFORM_SETTINGS data structure
5 | bUseHalfColorsForPeaks member of the WANALYZER_WAVEFORM_SETTINGS data structure
6 | nSelectionMode member of the WANALYZER_WAVEFORM_SETTINGS data structure
7 | colorWaveLineSelPeak member of the WANALYZER_WAVEFORM_SETTINGS data structure
8 | colorWaveLineSelCenter member of the WANALYZER_WAVEFORM_SETTINGS data structure
9 | colorWaveSelBackground member of the WANALYZER_WAVEFORM_SETTINGS data structure
10 | colorTransparentGlass member of the WANALYZER_WAVEFORM_SETTINGS data structure
11 | nTransparentGlassFactor member of the WANALYZER_WAVEFORM_SETTINGS data structure
12 | colorVolumeLevelLine member of the WANALYZER_WAVEFORM_SETTINGS data structure
13 | colorTimeLine member of the WANALYZER_WAVEFORM_SETTINGS data structure
14 | nTransparentGlassType member of the WANALYZER_WAVEFORM_SETTINGS data structure
15 | nTransparentGlassPos3D member of the WANALYZER_WAVEFORM_SETTINGS data structure
16 | bTransparentGlassInvert3D member of the WANALYZER_WAVEFORM_SETTINGS data structure
17 | bDrawLinesOverWave member of the WANALYZER_WAVEFORM_SETTINGS data structure

strValue

String representing the numerical value to set: the multimedia engine will manage converting the string into the corresponding numerical value.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"

Return value

Value | Meaning
Empty string | An error occurred: see the LastError property for further error details or for a list of the possible error values.
Valid string | String containing the value of the requested parameter


AnalyzeAbort method

AnalyzeAbort method

Remarks

Aborts an analysis session started through the AnalyzeSoundFromFile or AnalyzeSoundFromFileRaw methods.

Syntax

[Visual Basic]

control.AnalyzeAbort (

) as enumWanErrorCodes

[C++]

short control.AnalyzeAbort (

);

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.


AnalyzeLastSessionAgain method

AnalyzeLastSessionAgain method

Remarks

Performs a new waveform analysis using the same sound data used in a previous session. This may be useful when analyzed sound data remains unchanged but the resolution of the waveform analysis is changed through a call to the SettingsGeneralSet method where the nResolution field of the WANALYZER_GENERAL_SETTINGS data structure has been modified.

Syntax

[Visual Basic]

control.AnalyzeLastSessionAgain (

) as enumWanErrorCodes

[C++]

short control.AnalyzeLastSessionAgain (

);

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.


AnalyzeSoundFromFile method

AnalyzeSoundFromFile method

Remarks

Starts the analysis of the given media file. Supported media file formats can be divided in three categories:

· Audio formats supported natively, meaning that the decoding is performed directly inside the internal code of the component:

- Microsoft WAV | - Free Lossless Audio Codec - FLAC | - OGG/Vorbis
- Sun / DEC / NeXT AU / SND | - Apple AIFF / SGI / AIFC | - Apple CAF
- Commodore Amiga IFF / SVX | - Creative VOC | - Fasttracker 2 XI
- GNU Octave 2.0 MAT4 | - GNU Octave 2.1 MAT5 | - HMM Tool Kit - HTK
- IRCAM SF | - Paris Audio File - PAF | - Portable Voice Format - PVF
- Sound Designer II - SD2 | - Soundforge W64 | - Sphere Nist WAV

for a full list of encodings supported by the single audio formats available on the table above see the Appendix A - Encodings for audio formats supported natively section.

· Audio and video formats supported by Microsoft Media Foundation (only on Windows Vista and higher versions); for a full list of supported media formats, please, see the related Microsoft Media Foundation page on the MSDN web site.

· Audio and video formats supported by Microsoft DirectShow: depending upon the format of the media file, there could be the need to install specific DirectShow codecs.

For analyzing files in RAW format use the AnalyzeSoundFromFileRaw method.

Data resulting from an analysis session can be discarded from memory using the FreeMemory method.

By default the full audio file is analyzed: in case you should only need to analyze a specific portion of the audio file, you could limit the analyzed range through the AnalyzeSoundFromFileRangeSet method.

In case of media files whose format is not supported natively, the call to this method will try extracting the audio track through Microsoft Media Foundation or through Microsoft DirectShow: in case of successful opening of the media file, during the audio extraction the container application will be notified about the current advancement through the AudioExtractFromMediaFileStart event followed by a number of AudioExtractFromMediaFilePerc events and finally by the AudioExtractFromMediaFileDone event.

After the audio extraction or when dealing with natively supported formats, the waveform analysis phase starts automatically and the container application is notified about the current advancement through the WaveAnalysisStart event followed by a number of WaveAnalysisPerc events and finally by the WaveAnalysisDone event.

When dealing with audio or video formats not supported natively, in case you should be willing to perform waveform analysis automatically during the extraction, you may invoke the EnableAutoWaveAnalysisOnLoad method.

Syntax

[Visual Basic]

control.AnalyzeSoundFromFile (

strPathname as string

) as enumWanErrorCodes

[C++]

short control.AnalyzeSoundFromFile (

LPCTSTR strPathname

);

Parameter | Description
strPathname | String representing the absolute pathname of the input media file.

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to see the error code meaning
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful.


AnalyzeSoundFromFileRaw method

AnalyzeSoundFromFileRaw method

Remarks

Starts the analysis of the given RAW audio file.

Data resulting from an analysis session can be discarded from memory using the FreeMemory method.

By default the full audio file is analyzed: in case you should only need to analyze a specific portion of the audio file, you could limit the analyzed range through the AnalyzeSoundFromFileRangeSet method.

A successful call to this method will fire the WaveAnalysisStart event followed by a number of WaveAnalysisPerc events and finally by the WaveAnalysisDone event.

Syntax

[Visual Basic]

control.AnalyzeSoundFromFileRaw (

strPathname as string,

nEncodeMode as enumRAWEncodeModes,

bIsBigEndian as enumBoolean,

nFrequency as Long,

nChannels as Long

) as enumWanErrorCodes

[C++]

short control.AnalyzeSoundFromFileRaw (

LPCTSTR strPathname,

short nEncodeMode,

short bIsBigEndian,

long nFrequency,

long nChannels

);

Parameter | Description
strPathname | String representing the absolute pathname of the input file.

nEncodeMode

Encode mode used to encode the RAW file.

Supported values are the following:

Mnemonic constant | Numeric value | Meaning
RAW_ENCODE_PCM_U8 | 0 | RAW PCM 8 bits Unsigned
RAW_ENCODE_PCM_S8 | 1 | RAW PCM 8 bits Signed
RAW_ENCODE_PCM_S16 | 2 | RAW PCM 16 bits Signed
RAW_ENCODE_PCM_S24 | 3 | RAW PCM 24 bits Signed
RAW_ENCODE_PCM_S32 | 4 | RAW PCM 32 bits Signed
RAW_ENCODE_FLOAT32 | 5 | RAW 32 bits floating point
RAW_ENCODE_G711_ULAW | 6 | RAW G711 U-LAW
RAW_ENCODE_G711_ALAW | 7 | RAW G711 A-LAW
RAW_ENCODE_GSM_610 | 8 | RAW GSM 6.10
RAW_ENCODE_DIALOGIC_VOX | 9 | RAW Dialogic ADPCM VOX

bIsBigEndian

Boolean flag that specifies if bits order inside the RAW file are little-endian or big-endian

Supported values are the following:

Mnemonic Value | Meaning
BOOL_FALSE | The RAW file is encoded using little-endian
BOOL_TRUE | The RAW file is encoded using big-endian

nFrequency

Sample rate of the RAW file (e.g. 44100)

nChannels

Number of channels of the RAW file: 1 for Mono or 2 for Stereo

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to see the error code meaning
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful.


AnalyzeSoundFromFileRangeSet method

AnalyzeSoundFromFileRangeSet method

Remarks

Defines the effective sound range that will be analyzed through the AnalyzeSoundFromFile and AnalyzeSoundFromFileRaw methods.

Syntax

[Visual Basic]

control.AnalyzeSoundFromFileRangeSet (

nStartPositionInMs as Long,

nEndPositionInMs as Long

) as enumWanErrorCodes

[C++]

short control.AnalyzeSoundFromFileRangeSet (

long nStartPositionInMs,

long nEndPositionInMs

);

Parameter | Description
nStartPositionInMs | Number representing the range's start position expressed in milliseconds. By default this value is set to 0 which represents the beginning of the audio file.
nEndPositionInMs | Number representing the range's end position expressed in milliseconds. By default this value is set to -1 which represents the end of the audio file.

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.


ExternalSoundAnalysisPushData method

ExternalSoundAnalysisPushData method

Remarks

Receives a chunk of PCM sound data through a memory buffer provided by an external source in order to perform a sound waveform analysis.

Before invoking this method call the ExternalSoundAnalysisStart method which allows determining the format of PCM sound data passed inside the memory buffer.

Syntax

[Visual Basic]

control.ExternalSoundAnalysisPushData (

pBuffer as variant,

nBufferLength as long

) as enumErrorCodes

[C++]

short control.ExternalSoundAnalysisPushData (

const VARIANT FAR& pBuffer,

long nBufferLength

);

Parameter | Description
pBuffer | Buffer containing PCM sound data. The format of PCM sound data is determined by a previous call to the ExternalSoundAnalysisStart method.
nBufferLength | Length of the input buffer expressed in bytes

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to see the error code meaning
enumErrorCodes.ERR_NOERROR (0) | The method call was successful.


ExternalSoundAnalysisStart method

ExternalSoundAnalysisStart method

Remarks

Starts receiving a stream of sound data provided by an external source in order to perform a sound waveform analysis.

After invoking this method, the container application can start providing audio PCM data to the waveform analyzer component through a sequence of calls to the ExternalSoundAnalysisPushData method. Once the full PCM has been provided, the ExternalSoundAnalysisStop method must be called in order to start the waveform analysis.

Syntax

[Visual Basic]

control.ExternalSoundAnalysisStart (

nEncodeMode as enumRAWEncodeModes,

bIsBigEndian as enumBoolean,

nFrequency as Long,

nChannels as Long

) as enumWanErrorCodes

[C++]

short control.ExternalSoundAnalysisStart (

short nEncodeMode,

short bIsBigEndian,

long nFrequency,

long nChannels

);

Parameter | Description

nEncodeMode

Encode mode used to encode the RAW stream.

Supported values are the following:

Mnemonic constant | Numeric value | Meaning
RAW_ENCODE_PCM_U8 | 0 | RAW PCM 8 bits Unsigned
RAW_ENCODE_PCM_S8 | 1 | RAW PCM 8 bits Signed
RAW_ENCODE_PCM_S16 | 2 | RAW PCM 16 bits Signed
RAW_ENCODE_PCM_S24 | 3 | RAW PCM 24 bits Signed
RAW_ENCODE_PCM_S32 | 4 | RAW PCM 32 bits Signed
RAW_ENCODE_FLOAT32 | 5 | RAW 32 bits floating point
RAW_ENCODE_G711_ULAW | 6 | RAW G711 U-LAW
RAW_ENCODE_G711_ALAW | 7 | RAW G711 A-LAW
RAW_ENCODE_GSM_610 | 8 | RAW GSM 6.10
RAW_ENCODE_DIALOGIC_VOX | 9 | RAW Dialogic ADPCM VOX

bIsBigEndian

Boolean flag that specifies if bits order inside the RAW stream are little-endian or big-endian

Supported values are the following:

Mnemonic Value | Meaning
BOOL_FALSE | The RAW stream is encoded using little-endian
BOOL_TRUE | The RAW stream is encoded using big-endian

nFrequency

Sample rate of the RAW stream (e.g. 44100)

nChannels

Number of channels of the RAW stream: 1 for Mono or 2 for Stereo

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to see the error code meaning
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful.


ExternalSoundAnalysisStop method

ExternalSoundAnalysisStop method

Remarks

Starts the analysis of the given RAW audio file.

A successful call to this method will fire the WaveAnalysisStart event followed by a number of WaveAnalysisPerc events and finally by the WaveAnalysisDone event.

Syntax

[Visual Basic]

control.ExternalSoundAnalysisStop (

bSuccess as enumBoolean

) as enumWanErrorCodes

[C++]

short control.ExternalSoundAnalysisStop (

short bSuccess

);

Parameter

Description

bSuccess

Boolean flag that specifies if this stop can be considered as a successful conclusion of the PCM sound data transfer, meaning that the waveform analysis can be started, or if the stop can be considered as an abort operation.

Supported values are the following:

Mnemonic Value

Meaning

BOOL_FALSE

The transfer of PCM sound data needs to be aborted.

BOOL_TRUE

The transfer of PCM sound data from the external source is completed and the waveform analysis can be started.

Before invoking this method the container application must have invoked the ExternalSoundAnalysisStart method followed by one or more calls to the ExternalSoundAnalysisPushData method.

In this situation the control will fire the WaveAnalysisStart event followed by a number of WaveAnalysisPerc events and finally by the WaveAnalysisDone event.

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to see the error code meaning
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful.


SoundAnalysisCopyFromOtherInstance method

SoundAnalysisCopyFromOtherInstance method

Remarks

Copies the latest waveform analysis from another instance of the component that already performed a sound analysis. Through this method there is the possibility to avoid performing a new sound analysis for two or more instances of the component that need displaying the waveform of the same sound.

Syntax

[Visual Basic]

control.SoundAnalysisCopyFromOtherInstance (

hWndSourceInstance as OLE_HANDLE

) as enumWanErrorCodes

[C++]

short control.SoundAnalysisCopyFromOtherInstance (

OLE_HANDLE hWndSourceInstance

);

Parameter | Description
hWndSourceInstance | Handle (HWND) to the window of the instance of the control that acts as a source for copying results of a previous sound analysis.

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


AudioExtractFromMediaFileDone event

AudioExtractFromMediaFileDone event

Remarks

Occurs at the end of the extraction of the audio track from a media file, loaded through the AnalyzeSoundFromFile method, not supported natively for which the usage of Microsoft Media Foundation or Microsoft DirectShow is required.

Syntax

[Visual Basic]

AudioExtractFromMediaFileDone (

ByVal nResult as enumWanErrorCodes

)

[C++]

void AudioExtractFromMediaFileDone (

long nResult

);

Parameter

Description

nResult

The result of the append session.

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to see the error code meaning
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The append session was completed successfully.


AudioExtractFromMediaFilePerc event

AudioExtractFromMediaFilePerc event

Remarks

Occurs during the extraction of the audio track from a media file, loaded through the AnalyzeSoundFromFile method, not supported natively in order to inform about the total advancement percentage.

Syntax

[Visual Basic]

AudioExtractFromMediaFilePerc (

ByVal nPercentage as integer

)

[C++]

void AudioExtractFromMediaFilePerc (

short nPercentage

);

Parameter | Description
nPercentage | Number representing the percentage of advancement for the current audio extraction session


AudioExtractFromMediaFileStart event

AudioExtractFromMediaFileStart event

Remarks

Occurs at the beginning of the extraction of the audio track from a media file, loaded through the AnalyzeSoundFromFile method, not supported natively for which the usage of Microsoft Media Foundation or Microsoft DirectShow is required.

Syntax

[Visual Basic]

AudioExtractFromMediaFileStart (

)

[C++]

void AudioExtractFromMediaFileStart (

);


WaveAnalysisDone event

WaveAnalysisDone event

Remarks

Occurs when the analysis of a sound's waveform has been completed or aborted. The analysis is started through a previous call to the AnalyzeSoundFromFile, AnalyzeSoundFromFileRaw or ExternalSoundAnalysisStop methods.

Syntax

[Visual Basic]

WaveAnalysisDone (

ByVal nTotalPeaksDetected as Long,

ByVal fPeakDurationInMs as Single,

ByVal nMaxPeakLeft as Long,

ByVal nMaxPeakRight as Long

)

[C++]

void WaveAnalysisDone (

long nTotalPeaksDetected,

float fPeakDurationInMs,

long nMaxPeakLeft,

long nMaxPeakRight

);

Parameter | Description
nTotalPeaksDetected | Number representing the amount of peaks detected during the sound's analysis.
fPeakDurationInMs | Floating point number representing the duration in milliseconds of each detected peak.
nMaxPeakLeft | Level of the highest peak detected on the left channel; the peak value can be in the range from 0 to 32767
nMaxPeakRight | Level of the highest peak detected on the right channel; the peak value can be in the range from 0 to 32767


WaveAnalysisPerc event

WaveAnalysisPerc event

Remarks

Occurs during the analysis of a sound's waveform in order to notify the container application about the analysis advancement. The analysis is started through a previous call to the AnalyzeSoundFromFile, AnalyzeSoundFromFileRaw or ExternalSoundAnalysisStop methods.

Syntax

[Visual Basic]

WaveAnalysisPerc (

ByVal nPercentage as integer

)

[C++]

void WaveAnalysisPerc (

short nPercentage

);

Parameter | Description
nPercentage | Number representing the percentage of advancement for the current sound analysis


WaveAnalysisStart event

WaveAnalysisStart event

Remarks

Occurs when the analysis of a sound's waveform begins. The analysis is started through a previous call to the AnalyzeSoundFromFile, AnalyzeSoundFromFileRaw or ExternalSoundAnalysisStop methods.

Syntax

[Visual Basic]

WaveAnalysisStart (

)

[C++]

void WaveAnalysisStart (

);


WaveAnalyzerDisplayRangeChange event

WaveAnalyzerDisplayRangeChange event

Remarks

Occurs when the waveform's range displayed on the Waveform Analyzer's display has been changed after a zooming operation or after a scrolling operation or after a call to the SetDisplayRange method.

Syntax

[Visual Basic]

WaveAnalyzerDisplayRangeChange (

ByVal nBeginPosInMs as Long,

ByVal nEndPosInMs as Long

)

[C++]

void WaveAnalyzerDisplayRangeChange (

long nBeginPosInMs,

long nEndPosInMs

);

Parameter | Description
nBeginPosInMs | Displayed range start position, expressed in milliseconds
nEndPosInMs | Displayed range end position, expressed in milliseconds


WaveAnalyzerDisplayWidthChange event

WaveAnalyzerDisplayWidthChange event

Remarks

Occurs when the waveform analyzer's display has been resized horizontally.

Syntax

[Visual Basic]

WaveAnalyzerDisplayWidthChange (

ByVal nWidthInMs as Long,

ByVal nWidthInPixels as Long

)

[C++]

void WWaveAnalyzerDisplayWidthChange (

long nWidthInMs,

long nWidthInPixels

);

Parameter | Description
nWidthInMs | Width of the display surface, expressed in milliseconds
nWidthInPixels | Width of the display surface, expressed in pixels


WaveAnalyzerGraphicItemClick event

WaveAnalyzerGraphicItemClick event

Remarks

Occurs when a mouse button is clicked over a graphic item available on the waveform analyzer.

Syntax

[Visual Basic]

WaveAnalyzerGraphicItemClick (

ByVal nButton as enumMouseButtons,

ByVal nUniqueId as Integer,

ByVal nType as enumGraphicItemType,

ByVal nFlags as Long,

ByVal xPos as Long,

ByVal yPos as Long

)

[C++]

void WaveAnalyzerGraphicItemClick (

short nButton,

short nUniqueId,

short nType,

long nFlags,

long xPos,

long yPos

);

Parameter

Description

nButton

Clicked mouse button.

Supported values are the following:

Mnemonic constant | Value | Meaning
MOUSE_BTN_LEFT | 0 | Left mouse button
MOUSE_BTN_RIGHT | 1 | Right mouse button
MOUSE_BTN_MIDDLE | 2 | Middle mouse button

nUniqueID

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

nGraphicItemType

Type of graphic item.

Supported values are the following:

Mnemonic constant | Numeric value | Meaning
GRAPHIC_ITEM_VERTICAL_LINE | 0 | Vertical line
GRAPHIC_ITEM_HORIZONTAL_LINE | 1 | Horizontal line
GRAPHIC_ITEM_WAVE_RANGE | 2 | Wave range

nFlags

Can be a combination of the following values:

Value | Meaning
1 | Set if left mouse button is down (defined as MK_LBUTTON inside the Windows SDK)
2 | Set if right mouse button is down (defined as MK_RBUTTON inside the Windows SDK)
4 | Set if keyboard's SHIFT key is down (defined as MK_SHIFT inside the Windows SDK)
8 | Set if keyboard's CTRL key is down (defined as MK_CONTROL inside the Windows SDK)
16 (hex 10) | Set if middle mouse button is down (defined as MK_MBUTTON inside the Windows SDK)

xPos

Horizontal position, expressed in pixels respect to the waveform's client area, where the mouse generated the notification

yPos

Vertical position, expressed in pixels respect to the waveform's client area, where the mouse generated the notification


WaveAnalyzerGraphicItemDblClick event

WaveAnalyzerGraphicItemDblClick event

Remarks

Occurs when a mouse button is double clicked over a graphic item available on the waveform analyzer.

Syntax

[Visual Basic]

WaveAnalyzerGraphicItemDblClick (

ByVal nButton as enumMouseButtons,

ByVal nUniqueId as Integer,

ByVal nType as enumGraphicItemType,

ByVal nFlags as Long,

ByVal xPos as Long,

ByVal yPos as Long

)

[C++]

void WaveAnalyzerGraphicItemDblClick (

short nButton,

short nUniqueId,

short nType,

long nFlags,

long xPos,

long yPos

);

Parameter

Description

nButton

Clicked mouse button.

Supported values are the following:

Mnemonic constant | Value | Meaning
MOUSE_BTN_LEFT | 0 | Left mouse button
MOUSE_BTN_RIGHT | 1 | Right mouse button
MOUSE_BTN_MIDDLE | 2 | Middle mouse button

nUniqueID

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

· GraphicItemHorizontalLineAdd for horizontal lines
· GraphicItemVerticalLineAdd for vertical lines
· GraphicItemWaveRangeAdd for wave ranges

nGraphicItemType

Type of graphic item.

Supported values are the following:

Mnemonic constant | Numeric value | Meaning
GRAPHIC_ITEM_VERTICAL_LINE | 0 | Vertical line
GRAPHIC_ITEM_HORIZONTAL_LINE | 1 | Horizontal line
GRAPHIC_ITEM_WAVE_RANGE | 2 | Wave range

nFlags

Can be a combination of the following values:

Value | Meaning
1 | Set if left mouse button is down (defined as MK_LBUTTON inside the Windows SDK)
2 | Set if right mouse button is down (defined as MK_RBUTTON inside the Windows SDK)
4 | Set if keyboard's SHIFT key is down (defined as MK_SHIFT inside the Windows SDK)
8 | Set if keyboard's CTRL key is down (defined as MK_CONTROL inside the Windows SDK)
16 (hex 10) | Set if middle mouse button is down (defined as MK_MBUTTON inside the Windows SDK)

xPos

Horizontal position, expressed in pixels respect to the waveform's client area, where the mouse generated the notification

yPos

Vertical position, expressed in pixels respect to the waveform's client area, where the mouse generated the notification


WaveAnalyzerHorzLineLeaved event

WaveAnalyzerHorzLineLeaved event

Remarks

Occurs when the playback position leaves a graphic item of type "horizontal line" inside the waveform analyzer.

Syntax

[Visual Basic]

WaveAnalyzerHorzLineLeaved (

ByVal nUniqueID as Integer,

ByVal nStartPosInMs as Long,

ByVal nEndPosInMs as Long

)

[C++]

void WaveAnalyzerHorzLineLeaved (

short nUniqueID,

long nStartPosInMs,

long nEndPosInMs

);

Parameters | Description
nUniqueID | Unique identifier of the horizontal line; this unique identifier matches the unique identifier used when the custom line was created through the GraphicItemHorizontalLineAdd method.
nStartPosInMs | Start position of the horizontal line expressed in milliseconds
nEndPosInMs | End position of the horizontal line expressed in milliseconds


WaveAnalyzerHorzLineMoveBegin event

WaveAnalyzerHorzLineMoveBegin event

Remarks

Occurs at the beginning of the movement through the mouse of a graphic item of type "horizontal line" inside the waveform analyzer.

Syntax

[Visual Basic]

WaveAnalyzerHorzLineMoveBegin (

ByVal nUniqueID as Integer,

ByVal nStartPosInMs as Long,

ByVal nEndPosInMs as Long

)

[C++]

void WaveAnalyzerHorzLineMoveBegin (

short nUniqueID,

long nStartPosInMs,

long nEndPosInMs

);

Parameters | Description
nUniqueID | Unique identifier of the horizontal line; this unique identifier matches the unique identifier used when the custom line was created through the GraphicItemHorizontalLineAdd method.
nStartPosInMs | Start position of the horizontal line expressed in milliseconds
nEndPosInMs | End position of the horizontal line expressed in milliseconds


WaveAnalyzerHorzLineMoveEnd event

WaveAnalyzerHorzLineMoveEnd event

Remarks

Occurs when the movement through the mouse of a custom vertical line inside the waveform analyzer ends.

Syntax

[Visual Basic]

WaveAnalyzerHorzLineMoveEnd (

ByVal nUniqueID as Integer,

ByVal nStartPosInMs as Long,

ByVal nEndPosInMs as Long

)

[C++]

void WaveAnalyzerHorzLineMoveEnd (

short nUniqueID,

long nStartPosInMs,

long nEndPosInMs

);

Parameters | Description
nUniqueID | Unique identifier of the horizontal line; this unique identifier matches the unique identifier used when the custom line was created through the GraphicItemHorizontalLineAdd method.
nStartPosInMs | Start position of the horizontal line expressed in milliseconds
nEndPosInMs | End position of the horizontal line expressed in milliseconds


WaveAnalyzerHorzLineMoving event

WaveAnalyzerHorzLineMoving event

Remarks

Occurs when a graphic item of type "horizontal line" inside the waveform analyzer is being moved through the mouse or through the GraphicItemHorzPositionSet method.

Syntax

[Visual Basic]

WaveAnalyzerHorzLineMoving (

ByVal nUniqueID as Integer,

ByVal nStartPosInMs as Long,

ByVal nEndPosInMs as Long,

ByVal bMovedByCode as enumBoolean

)

[C++]

void WaveAnalyzerHorzLineMoving (

short nUniqueID,

long nStartPosInMs,

long nEndPosInMs,

short bMovedByCode

);

Parameter

Description

nUniqueID

Unique identifier of the vertical line; this unique identifier matches the unique identifier used when the custom line was created through the GraphicItemVerticalLineAdd method.

nStartPosInMs

Start position of the horizontal line expressed in milliseconds

nEndPosInMs

End position of the horizontal line expressed in milliseconds

bMovedByCode

Boolean value that specifies if the custom vertical line was moved through the GraphicItemHorzPositionSet method or through the mouse.

Supported values are the following:

Value | Meaning
BOOL_FALSE | The line was moved through the mouse
BOOL_TRUE | The line was moved through the GraphicItemHorzPositionSet method


WaveAnalyzerHorzLineReached event

WaveAnalyzerHorzLineReached event

Remarks

Occurs when the playback position reaches a graphic item of type "horizontal line" inside the waveform analyzer.

Syntax

[Visual Basic]

WaveAnalyzerHorzLineReached (

ByVal nUniqueID as Integer,

ByVal nStartPosInMs as Long,

ByVal nEndPosInMs as Long

)

[C++]

void WaveAnalyzerHorzLineReached (

short nUniqueID,

long nStartPosInMs,

long nEndPosInMs

);

Parameters | Description
nUniqueID | Unique identifier of the horizontal line; this unique identifier matches the unique identifier used when the custom line was created through the GraphicItemHorizontalLineAdd method.
nStartPosInMs | Start position of the horizontal line expressed in milliseconds
nEndPosInMs | End position of the horizontal line expressed in milliseconds


WaveAnalyzerLineMoveBegin event

WaveAnalyzerLineMoveBegin event

Remarks

Occurs at the beginning of the movement through the mouse of a graphic item of type "vertical line" inside the waveform analyzer.

Syntax

[Visual Basic]

WaveAnalyzerLineMoveBegin (

ByVal nUniqueID as Integer,

ByVal nPosInMs as Long

)

[C++]

void WaveAnalyzerLineMoveBegin (

short nUniqueID,

long nPosInMs

);

Parameter | Description
nUniqueID | Unique identifier of the vertical line; this unique identifier matches the unique identifier used when the custom line was created through the GraphicItemVerticalLineAdd method.
nPosInMs | Position of the vertical line expressed in milliseconds


WaveAnalyzerLineMoveEnd event

WaveAnalyzerLineMoveEnd event

Remarks

Occurs at the end of the movement through the mouse of a graphic item of type "vertical line" inside the waveform analyzer.

Syntax

[Visual Basic]

WaveAnalyzerLineMoveEnd (

ByVal nUniqueID as Integer,

ByVal nPosInMs as Long

)

[C++]

void WaveAnalyzerLineMoveEnd (

short nUniqueID,

long nPosInMs

);

Parameter | Description
nUniqueID | Unique identifier of the vertical line; this unique identifier matches the unique identifier used when the custom line was created through the GraphicItemVerticalLineAdd method.
nPosInMs | Position of the vertical line expressed in milliseconds


WaveAnalyzerLineMoving event

WaveAnalyzerLineMoving event

Remarks

Occurs when a graphic item of type "vertical line" inside the waveform analyzer is being moved through the mouse or through the GraphicItemHorzPositionSet method.

Syntax

[Visual Basic]

WaveAnalyzerLineMoving (

ByVal nUniqueID as Integer,

ByVal nPosInMs as Long,

ByVal bMovedByCode as enumBoolean

)

[C++]

void WaveAnalyzerLineMoving (

short nUniqueID,

long nPosInMs,

short bMovedByCode

);

Parameter

Description

nUniqueID

Unique identifier of the vertical line; this unique identifier matches the unique identifier used when the custom line was created through the GraphicItemVerticalLineAdd method.

nPosInMs

New position of the vertical line expressed in milliseconds

bMovedByCode

Boolean value that specifies if the custom vertical line was moved through the GraphicItemHorzPositionSet method or through the mouse.

Supported values are the following:

Value | Meaning
BOOL_FALSE | The line was moved through the mouse
BOOL_TRUE | The line was moved through the GraphicItemHorzPositionSet method


WaveAnalyzerLineReached event

WaveAnalyzerLineReached event

Remarks

Occurs when the playback position reaches a graphic item of type "vertical line" inside the waveform analyzer.

Syntax

[Visual Basic]

WaveAnalyzerLineReached (

ByVal nUniqueID as Integer,

ByVal nPosInMs as Long

)

[C++]

void WaveAnalyzerLineReached (

short nUniqueID,

long nPosInMs

);

Parameter | Description
nUniqueID | Unique identifier of the vertical line; this unique identifier matches the unique identifier used when the custom line was created through the GraphicItemVerticalLineAdd method.
nPosInMs | Position of the vertical line expressed in milliseconds


WaveAnalyzerMouseNotification event

WaveAnalyzerMouseNotification event

Remarks

Occurs when a mouse action happens over the waveform analyzer.

Syntax

[Visual Basic]

WaveAnalyzerMouseNotification (

ByVal nAction as enumMouseActions,

ByVal nFlags as Long,

ByVal xPos as Long,

ByVal yPos as Long,

ByVal nPressPosInPix as Long,

ByVal nPressPosInMs as Long

)

[C++]

void WaveAnalyzerMouseNotification (

short nAction,

long nFlags,

long xPos,

long yPos,

long nPressPosInPix,

long nPressPosInMs

);

Parameter

Description

nAction

Mouse action type.

Supported values are the following:

Mnemonic constant | Value | Meaning
MOUSE_ACTION_LEFT_DOWN | 0 | Left mouse button down
MOUSE_ACTION_LEFT_UP | 1 | Left mouse button up
MOUSE_ACTION_LEFT_CLICK | 2 | Left mouse button click
MOUSE_ACTION_LEFT_DBLCLICK | 3 | Left mouse button double click
MOUSE_ACTION_RIGHT_DOWN | 4 | Right mouse button down
MOUSE_ACTION_RIGHT_UP | 5 | Right mouse button up
MOUSE_ACTION_RIGHT_CLICK | 6 | Right mouse button click
MOUSE_ACTION_RIGHT_DBLCLICK | 7 | Right mouse button double click
MOUSE_ACTION_MOVE | 8 | Mouse move
MOUSE_ACTION_MIDDLE_DOWN | 9 | Middle mouse button down
MOUSE_ACTION_MIDDLE_UP | 10 | Middle mouse button up
MOUSE_ACTION_MIDDLE_CLICK | 11 | Middle mouse button click
MOUSE_ACTION_MIDDLE_DBLCLICK | 12 | Middle mouse button double click

nFlags

Can be a combination of the following values:

Value | Meaning
1 | Set if left mouse button is down (defined as MK_LBUTTON inside the Windows SDK)
2 | Set if right mouse button is down (defined as MK_RBUTTON inside the Windows SDK)
4 | Set if keyboard's SHIFT key is down (defined as MK_SHIFT inside the Windows SDK)
8 | Set if keyboard's CTRL key is down (defined as MK_CONTROL inside the Windows SDK)
16 (hex 10) | Set if middle mouse button is down (defined as MK_MBUTTON inside the Windows SDK)

xPos

Horizontal position, expressed in pixels respect to the waveform's client area, where the mouse generated the notification

yPos

Vertical position, expressed in pixels respect to the waveform's client area, where the mouse generated the notification

nPressPosInPix

Number representing the position expressed in pixels where the mouse button was pressed. If the mouse action should have been performed outside of the waveform's area, this parameter would be set to -1.

It's important to note that this parameter doesn't represent the horizontal position on the waveform's visible area (for this you can refer to the xPos parameter) but to the horizontal position in pixels calculated respect to the bitmap representation of the total waveform's width in pixels at the current horizontal zoom factor.

nPressPosInMs

Number representing the position expressed in milliseconds where the mouse button was pressed. If the mouse action should have been performed outside of the waveform's area, this parameter would be set to -1.


WaveAnalyzerPaintDone event

WaveAnalyzerPaintDone event

Remarks

Occurs when the waveform analyzer has completed its graphic rendering, allowing to add custom graphics directly from the container application's code.

Syntax

[Visual Basic]

WaveAnalyzerPaintDone (

ByVal hWnd as Long

)

[C++]

void WaveAnalyzerPaintDone (

long hWnd

);

Parameter | Description
hWnd | Handle (HWND) to the window of the Waveform Analyzer: through this handle its possible accessing the handle to the device context (HDC) of the Waveform Analyzer using Windows API, for example through the GetDC and ReleaseDC functions.


WaveAnalyzerSelectionChange event

WaveAnalyzerSelectionChange event

Remarks

Occurs when a portion of the waveform on the Waveform Analyzer's display has been selected/deselected through a mouse operation or through a call to the SetSelection method.

Syntax

[Visual Basic]

WaveAnalyzerSelectionChange (

ByVal bSelectionAvailable as enumBoolean,

ByVal nBeginPosInMs as Long,

ByVal nEndPosInMs as Long

)

[C++]

void WaveAnalyzerSelectionChange (

short bSelectionAvailable,

long nBeginPosInMs,

long nEndPosInMs

);

Parameter

Description

bSelectionAvailable

Flag for selection availability.

Supported values are the following:

Value | Meaning
BOOL_FALSE | No selection is currently available. In this case values passed through nBeginPosInMs and nEndPosInMs parameters must be ignored.
BOOL_TRUE | A selection is currently available and the start and end positions are inside nBeginPosInMs and nEndPosInMs parameters.

nBeginPosInMs

The selection's start position, expressed in milliseconds

nEndPosInMs

The selection's end position, expressed in milliseconds


WaveAnalyzerWaveRangeLeaved event

WaveAnalyzerWaveRangeLeaved event

Remarks

Occurs when the playback position leaves a graphic item of type "wave range" inside the waveform analyzer.

Syntax

[Visual Basic]

WaveAnalyzerWaveRangeLeaved (

ByVal nUniqueID as Integer,

ByVal nStartPosInMs as Long,

ByVal nEndPosInMs as Long

)

[C++]

void WaveAnalyzerWaveRangeLeaved (

short nUniqueID,

long nStartPosInMs,

long nEndPosInMs

);

Parameters | Description
nUniqueID | Unique identifier of the wave range; this unique identifier matches the unique identifier used when the wave range was created through the GraphicItemWaveRangeAdd method.
nStartPosInMs | Start position of the wave range expressed in milliseconds
nEndPosInMs | End position of the wave range expressed in milliseconds


WaveAnalyzerWaveRangeReached event

WaveAnalyzerWaveRangeReached event

Remarks

Occurs when the playback position reaches a graphic item of type "wave range" inside the waveform analyzer.

Syntax

[Visual Basic]

WaveAnalyzerWaveRangeReached (

ByVal nUniqueID as Integer,

ByVal nStartPosInMs as Long,

ByVal nEndPosInMs as Long

)

[C++]

void WaveAnalyzerWaveRangeReached (

short nUniqueID,

long nStartPosInMs,

long nEndPosInMs

);

Parameters | Description
nUniqueID | Unique identifier of the wave range; this unique identifier matches the unique identifier used when the wave range was created through the GraphicItemWaveRangeAdd method.
nStartPosInMs | Start position of the wave range expressed in milliseconds
nEndPosInMs | End position of the wave range expressed in milliseconds


WaveScrollerManualScroll event

WaveScrollerManualScroll event

Remarks

Occurs when a manual move is performed through the mouse on the waveform scroller.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

WaveScrollerManualScroll (

ByVal hWndWaveformScroller as OLE_HANDLE,

ByVal nNewPosInMs as Long

)

[C++]

void WaveScrollerManualScroll (

OLE_HANDLE hWndWaveformScroller,

long nNewPosInMs

);

Parameter | Description
hWndWaveformScroller | Handle of the waveform scroller control returned by a previous call to the WaveformScroller.Create method
nNewPosInMs | New sound position expressed in milliseconds after a manual scrolling operation


WaveScrollerMouseNotification event

WaveScrollerMouseNotification event

Remarks

Occurs when a mouse action happens over the waveform scroller.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

WaveScrollerMouseNotification (

ByVal hWndWaveformScroller as OLE_HANDLE,

ByVal nAction as enumMouseActions,

ByVal nFlags as Long,

ByVal xPos as Long,

ByVal yPos as Long,

ByVal nPressPosInPix as Long,

ByVal nPressPosInMs as Long

)

[C++]

void WaveScrollerMouseNotification (

OLE_HANDLE hWndWaveformScroller,

long nNewPosInMs,

short nAction,

long nFlags,

long xPos,

long yPos,

long nPressPosInPix,

long nPressPosInMs

);

Parameter

Description

hWndWaveformScroller

Handle of the waveform scroller control returned by a previous call to the WaveformScroller.Create method

nAction

Mouse action type.

Supported values are the following:

Mnemonic constant | Value | Meaning
MOUSE_ACTION_LEFT_DOWN | 0 | Left mouse button down
MOUSE_ACTION_LEFT_UP | 1 | Left mouse button up
MOUSE_ACTION_LEFT_CLICK | 2 | Left mouse button click
MOUSE_ACTION_LEFT_DBLCLICK | 3 | Left mouse button double click
MOUSE_ACTION_RIGHT_DOWN | 4 | Right mouse button down
MOUSE_ACTION_RIGHT_UP | 5 | Right mouse button up
MOUSE_ACTION_RIGHT_CLICK | 6 | Right mouse button click
MOUSE_ACTION_RIGHT_DBLCLICK | 7 | Right mouse button double click
MOUSE_ACTION_MOVE | 8 | Mouse move
MOUSE_ACTION_MIDDLE_DOWN | 9 | Middle mouse button down
MOUSE_ACTION_MIDDLE_UP | 10 | Middle mouse button up
MOUSE_ACTION_MIDDLE_CLICK | 11 | Middle mouse button click
MOUSE_ACTION_MIDDLE_DBLCLICK | 12 | Middle mouse button double click

nFlags

Can be a combination of the following values:

Value | Meaning
1 | Set if left mouse button is down (defined as MK_LBUTTON inside the Windows SDK)
2 | Set if right mouse button is down (defined as MK_RBUTTON inside the Windows SDK)
4 | Set if keyboard's SHIFT key is down (defined as MK_SHIFT inside the Windows SDK)
8 | Set if keyboard's CTRL key is down (defined as MK_CONTROL inside the Windows SDK)
16 (hex 10) | Set if middle mouse button is down (defined as MK_MBUTTON inside the Windows SDK)

xPos

Horizontal position, expressed in pixels respect to the waveform's client area, where the mouse generated the notification

yPos

Vertical position, expressed in pixels respect to the waveform's client area, where the mouse generated the notification

nPressPosInPix

Number representing the position expressed in pixels where the mouse button was pressed. If the mouse action should have been performed outside of the waveform's area, this parameter would be set to -1.

It's important to note that this parameter doesn't represent the horizontal position on the waveform's visible area (for this you can refer to the xPos parameter) but to the horizontal position in pixels calculated respect to the bitmap representation of the total waveform's width in pixels at the current horizontal zoom factor.

nPressPosInMs

Number representing the position expressed in milliseconds where the mouse button was pressed. If the mouse action should have been performed outside of the waveform's area, this parameter would be set to -1.


WaveformScroller object

WaveformScroller object

The WaveformScroller object, accessible through the control's WaveformScroller property, is internally implemented as a COM interface called IWaveformScroller and contains information needed to render a waveform that will scroll during playback.

It can be used at Run-time in order to create a waveform scroller and to change its graphical settings. For details about using waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

The WaveformScroller object is implemented through the following methods:

Methods

Create

Destroy

Move

Refresh

SetBackPictureFromFile

SetBackPictureFromHandle

SetCursor

SettingsGet

SettingsSet

SettingsParamGet

SettingsParamSet

SetViewLength

Show

Data structures

WSCROLLER_SETTINGS

Samples of use of the WaveformScroller object in Visual C++ 6 and Visual Basic 6 can be found inside the following samples installed with the product's setup package:

- SoundEditor

- WaveformAnalyzer


WaveformScroller.Create method

WaveformScroller.Create method

Remarks

Creates a new instance of the WaveformScroller object on the given parent window.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.Create (

hWndParent as OLE_HANDLE,

nLeft as Long,

nTop as Long,

nWidth as Long,

nHeight as Long

) as OLE_HANDLE

[C++]

OLE_HANDLE control.WaveformScroller.Create (

OLE_HANDLE hWndParent,

long nLeft,

long nTop,

long nWidth,

long nHeight

);

Parameter | Description
hWndParent | Handle of the parent window, usually the container form.
nLeft | Left position of the window, expressed in client coordinates (pixels) of hWndParent
nTop | Top position of the window, expressed in client coordinates (pixels) of hWndParent
nWidth | Width of the window, expressed in pixels
nHeight | Height of the window, expressed in pixels

Return value

Value | Meaning
0 | An error occurred, check the LastError property value in order to get the error code
Other values | Handle (HWND) of the new waveform scroller


WaveformScroller.Destroy method

WaveformScroller.Destroy method

Remarks

Destroys an existing waveform scroller control.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.Destroy (

hWndWaveformScroller as OLE_HANDLE

) as enumWanErrorCodes

[C++]

short control.WaveformScroller.Destroy (

OLE_HANDLE hWndWaveformScroller

);

Parameter | Description
hWndWaveformScroller | Handle of the control returned by a previous call to the WaveformScroller.Create method

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


WaveformScroller.GetViewLength method

WaveformScroller.GetViewLength method

Remarks

Obtains the length of the waveform scroller's view in terms of displayed milliseconds. The view length can be modified through the WaveformScroller.SetViewLength method.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.GetViewLength (

hWndWaveformScroller as OLE_HANDLE,

nLengthInMs as Long

) as enumWanErrorCodes

[C++]

short control.WaveformScroller.SetViewLength (

OLE_HANDLE GetViewLength,

long *nLengthInMs

);

Parameter | Description
hWndWaveformScroller | Handle of the control returned by a previous call to the WaveformScroller.Create method
nLengthInMs | Reference that, on return from the method call, will contain the length of the view in milliseconds.

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


WaveformScroller.Move method

WaveformScroller.Move method

Remarks

Moves or resizes an existing waveform scroller control.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.Move (

hWndWaveformScroller as OLE_HANDLE,

nLeft as Long,

nTop as Long,

nWidth as Long,

nHeight as Long

) as enumWanErrorCodes

[C++]

short control.WaveformScroller.Move (

OLE_HANDLE hWndWaveformScroller,

long nLeft,

long nTop,

long nWidth,

long nHeight

);

Parameter | Description
hWndWaveformScroller | Handle of the control returned by a previous call to the WaveformScroller.Create method
nLeft | Left position of the window, expressed in parent's client coordinates (pixels)
nTop | Top position of the window, expressed in parent's client coordinates (pixels)
nWidth | Width of the window, expressed in pixels
nHeight | Height of the window, expressed in pixels

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


WaveformScroller.Refresh method

WaveformScroller.Refresh method

Remarks

Refreshes an existing waveform scroller control.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.Refresh (

hWndWaveformScroller as OLE_HANDLE

) as enumWanErrorCodes

[C++]

short control.WaveformScroller.Refresh (

OLE_HANDLE hWndWaveformScroller

);

Parameter | Description
hWndWaveformScroller | Handle of the control returned by a previous call to the WaveformScroller.Create method

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


WaveformScroller.SetBackPictureFromFile method

WaveformScroller.SetBackPictureFromFile method

Remarks

Sets a background picture from a graphic file.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.SetBackPictureFromFile (

hWndWaveformScroller as OLE_HANDLE,

strPathname as String,

nMode as enumBitmapModes

) as enumWanErrorCodes

[C++]

short control.WaveformScroller.SetBackPictureFromFile (

OLE_HANDLE hWndWaveformScroller,

LPCTSTR strPathname,

short nMode

);

Parameter

Description

hWndWaveformScroller

Handle of the control returned by a previous call to the WaveformScroller.Create method

strPathname

Absolute pathname of the picture file to load. Accepted graphic formats are BMP, JPEG, GIF, TIFF and PNG.

An empty pathname will reset an eventual picture set through a previous call to this method.

nMode

Bitmap mode.

Supported values are the following:

Mnemonic constant | Value | Meaning
BITMAP_MODE_TOP_LEFT | 0 | Bitmap will be drawn in top-left position on the destination rectangle
BITMAP_MODE_CENTER | 1 | Bitmap will be drawn in centered position on the destination rectangle
BITMAP_MODE_STRETCH | 2 | Bitmap will be stretched in order to fit the destination rectangle
BITMAP_MODE_TILE | 3 | Bitmap will be tiled in order to fill the destination rectangle

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


WaveformScroller.SetBackPictureFromHandle method

WaveformScroller.SetBackPictureFromHandle method

Remarks

Sets a background picture from an existing bitmap handle.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.SetBackPictureFromHandle (

hWndWaveformScroller as OLE_HANDLE,

hBitmap as OLE_HANDLE,

nMode as enumBitmapModes

) as enumWanErrorCodes

[C++]

short control.WaveformScroller.SetBackPictureFromHandle (

OLE_HANDLE hWndWaveformScroller,

OLE_HANDLE hBitmap,

short nMode

);

Parameter

Description

hWndWaveformScroller

Handle of the control returned by a previous call to the WaveformScroller.Create method

hBitmap

Handle (HBITMAP) of the bitmap to apply. If this parameter is set to 0 an eventual picture set through a previous call to this method will be reset.

nMode

Bitmap mode.

Supported values are the following:

Mnemonic constant | Value | Meaning
BITMAP_MODE_TOP_LEFT | 0 | Bitmap will be drawn in top-left position on the destination rectangle
BITMAP_MODE_CENTER | 1 | Bitmap will be drawn in centered position on the destination rectangle
BITMAP_MODE_STRETCH | 2 | Bitmap will be stretched in order to fit the destination rectangle
BITMAP_MODE_TILE | 3 | Bitmap will be tiled in order to fill the destination rectangle

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


WaveformScroller.SetCursor method

WaveformScroller.SetCursor method

Remarks

Sets the cursor to display, from an existing cursor handle (HCURSOR), when the mouse hovers the control's area.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.SetCursor (

hWndWaveformScroller as OLE_HANDLE,

hCursor as OLE_HANDLE

) as enumWanErrorCodes

[C++]

short control.WaveformScroller.SetCursor (

OLE_HANDLE hWndWaveformScroller,

OLE_HANDLE hCursor

);

Parameter | Description
hWndWaveformScroller | Handle of the control returned by a previous call to the WaveformScroller.Create method
hCursor | Handle of the cursor to apply. If this parameter is set to 0 an eventual cursor set through a previous call to this method will be reset.

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


WaveformScroller.SettingsGet method

WaveformScroller.SettingsGet method

Remarks

Retrieves the current graphical settings for the given waveform scroller. Settings can be modified through the WaveformScroller.SettingsSet method.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.SettingsGet (

hWndWaveformScroller as IntPtr,

ByRef settings as Long

) as enumWanErrorCodes

[C++]

short control.WaveformScroller.SettingsGet (

IntPtr hWndWaveformScroller,

void *settings

);

Parameter | Description
hWndWaveformScroller | Handle of the control returned by a previous call to the WaveformScroller.Create method
settings | Address of a structure of type WSCROLLER_SETTINGS that, on return from the method call, will contain the waveform scroller current settings.

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.


WaveformScroller.SettingsSet method

WaveformScroller.SettingsSet method

Remarks

Modifies the graphical settings for the given graphic bar. Current settings can be obtained through the WaveformScroller.SettingsGet method.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.SettingsSet (

hWndWaveformScroller as IntPtr,

settings as Long

) as enumWanErrorCodes

[C++]

short control.WaveformScroller.SettingsSet (

IntPtr hWndWaveformScroller,

void *settings

);

Parameter | Description
hWndWaveformScroller | Handle of the control returned by a previous call to the WaveformScroller.Create method
settings | Address of a structure of type WSCROLLER_SETTINGS containing the waveform scroller new settings.

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.


WaveformScroller.SettingsParamGet method

WaveformScroller.SettingsParamGet method

Remarks

Retrieves one of the current graphical settings for the given waveform scroller. Single settings can be modified through the WaveformScroller.SettingsParamSet method.

This method is an alternative to the WaveformScroller.SettingsGet method and it's provided with the purpose of allowing single settings retrieval when dealing with languages like JavaScript where data structures are not easy to implement.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.SettingsParamGet (

hWndWaveformScroller as OLE_HANDLE,

nParam as short

) as String

[C++]

BSTR control.WaveformScroller.SettingsParamGet (

OLE_HANDLE hWndWaveformScroller,

short nParam

);

Parameter

Description

hWndWaveformScroller

Handle of the control returned by a previous call to the WaveformScroller.Create method

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Numeric value | Meaning
0 | nStereoVisualizationMode field of the WSCROLLER_SETTINGS data structure
1 | colorWaveLinePeak field of the WSCROLLER_SETTINGS data structure
2 | colorWaveLineCenter field of the WSCROLLER_SETTINGS data structure
3 | nWaveLineIntensityFactor field of the WSCROLLER_SETTINGS data structure
4 | colorWaveBackground field of the WSCROLLER_SETTINGS data structure
5 | bUseHalfColorsForPeaks field of the WSCROLLER_SETTINGS data structure
6 | bAppearance3d field of the WSCROLLER_SETTINGS data structure
7 | colorPositionLine field of the WSCROLLER_SETTINGS data structure
8 | colorBorder field of the WSCROLLER_SETTINGS data structure
9 | bPositionLineShow field of the WSCROLLER_SETTINGS data structure
10 | nPositionLineDashStyle field of the WSCROLLER_SETTINGS data structure
11 | nPositionLineWidth field of the WSCROLLER_SETTINGS data structure
12 | nPositionLineHighCap field of the WSCROLLER_SETTINGS data structure
13 | nPositionLineLowCap field of the WSCROLLER_SETTINGS data structure
14 | nPositionLineDashCap field of the WSCROLLER_SETTINGS data structure
15 | nPositionLineTranspFactor field of the WSCROLLER_SETTINGS data structure
16 | nGraphicItemsMask field of the WSCROLLER_SETTINGS data structure
17 | nUpdateSpeed field of the WSCROLLER_SETTINGS data structure
18 | fVerticalZoomFactor field of the WSCROLLER_SETTINGS data structure

Return value

Value

Meaning

Empty string

An error occurred: see the LastError property for further error details or for a list of the possible error values.

Valid string

String containing the value of the requested parameter..

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"


WaveformScroller.SettingsParamSet method

WaveformScroller.SettingsParamSet method

Remarks

Sets one of the graphical settings for the given waveform scroller. Value of single settings can be obtained through the WaveformScroller.SettingsParamGet method.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.SettingsParamSet (

hWndWaveformScroller as OLE_HANDLE,

pParamData as Long,

strValue as String

) as enumWanErrorCodes

[C++]

short control.WaveformScroller.SettingsParamSet (

OLE_HANDLE hWndWaveformScroller,

void *pParamData,

LPCTSTR strValue

);

Parameter

Description

hWndWaveformScroller

Handle of the control returned by a previous call to the WaveformScroller.Create method

nParam

Numeric identifier of the requested parameter.

Supported values are the following:

Numeric value | Meaning
0 | nStereoVisualizationMode field of the WSCROLLER_SETTINGS data structure
1 | colorWaveLinePeak field of the WSCROLLER_SETTINGS data structure
2 | colorWaveLineCenter field of the WSCROLLER_SETTINGS data structure
3 | nWaveLineIntensityFactor field of the WSCROLLER_SETTINGS data structure
4 | colorWaveBackground field of the WSCROLLER_SETTINGS data structure
5 | bUseHalfColorsForPeaks field of the WSCROLLER_SETTINGS data structure
6 | bAppearance3d field of the WSCROLLER_SETTINGS data structure
7 | colorPositionLine field of the WSCROLLER_SETTINGS data structure
8 | colorBorder field of the WSCROLLER_SETTINGS data structure
9 | bPositionLineShow field of the WSCROLLER_SETTINGS data structure
10 | nPositionLineDashStyle field of the WSCROLLER_SETTINGS data structure
11 | nPositionLineWidth field of the WSCROLLER_SETTINGS data structure
12 | nPositionLineHighCap field of the WSCROLLER_SETTINGS data structure
13 | nPositionLineLowCap field of the WSCROLLER_SETTINGS data structure
14 | nPositionLineDashCap field of the WSCROLLER_SETTINGS data structure
15 | nPositionLineTranspFactor field of the WSCROLLER_SETTINGS data structure
16 | nGraphicItemsMask field of the WSCROLLER_SETTINGS data structure
17 | nUpdateSpeed field of the WSCROLLER_SETTINGS data structure
18 | fVerticalZoomFactor field of the WSCROLLER_SETTINGS data structure

strValue

String representing the numerical value to set: the multimedia engine will manage converting the string into the corresponding numerical value.

The value is formatted with the following rules:

· Color values are formatted like "#RRGGBB" where:

- "#" represents the control character used for formatting colors in HTML code: the presence of this character is mandatory

- RR represents the hexadecimal value of the color's red component

- GG represents the hexadecimal value of the color's green component

- BB represents the hexadecimal value of the color's blue component

For example the green color will be represented with the value "#00FF00"

· Boolean values are rendered as

- "1" or "True" for indicating the boolean "true"

- "0" or "False" for indicating the boolean "false"

Return value

Value | Meaning
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The call was successful.
Negative value | An error occurred: see the LastError property for further error details or for a list of the possible error values.


WaveformScroller.SetViewLength method

WaveformScroller.SetViewLength method

Remarks

Sets the length of the waveform scroller's view in terms of displayed milliseconds. The current length can be obtained through the WaveformScroller.GetViewLength method.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.SetViewLength (

hWndWaveformScroller as OLE_HANDLE,

nLengthInMs as Long

) as enumWanErrorCodes

[C++]

short control.WaveformScroller.SetViewLength (

OLE_HANDLE hWndWaveformScroller,

long nLengthInMs

);

Parameter

Description

hWndWaveformScroller

Handle of the control returned by a previous call to the WaveformScroller.Create method

nLengthInMs

Length of the view in milliseconds; by default this value is set to 10000, meaning that the waveform scroller will display 10 seconds of sound.

This value must be big enough to guarantee that one pixel on the view is provided for each millisecond of sound: if the provided value should be smaller, the component would automatically adapt it and the updated length in milliseconds could be verified through the WaveformScroller.GetViewLength method.

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


WaveformScroller.Show method

WaveformScroller.Show method

Remarks

Shows/hides an existing waveform scroller control.

For further details about methods of the Waveform scroller refer to the WaveformScroller object.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Syntax

[Visual Basic]

control.WaveformScroller.Show (

hWndWaveformScroller as OLE_HANDLE,

bShow as enumBoolean

) as enumWanErrorCodes

[C++]

short control.WaveformScroller.Show (

OLE_HANDLE hWndWaveformScroller,

short bShow

);

Parameter

Description

hWndWaveformScroller

Handle of the control returned by a previous call to the WaveformScroller.Create method

bShow

Boolean value that specifies if it must show/hide the given graphic bar control.

Supported values are the following:

Value | Meaning
BOOL_FALSE | Hides the graphic bar window
BOOL_TRUE | Shows the graphic bar window

Return value

Value | Meaning
Negative value | An error occurred, check the LastError property value in order to get the error code
enumWanErrorCodes.ERR_WAN_NOERROR (0) | The method call was successful


WSCROLLER_SETTINGS stucture

WSCROLLER_SETTINGS structure

The WSCROLLER_SETTINGS data structure describes the graphical settings applied to a specific waveform scroller. Graphical settings related to a specific waveform scroller can be retrieved and modified through the WaveformScroller.SettingsGet and WaveformScroller.SettingsSet methods.

For further details about methods of the Waveform scroller refer to the WaveformScroller class.

For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.

Visual C++ definition

typedef struct

{

     long nStereoVisualizationMode;

     OLE_COLOR colorWaveLinePeak;

     OLE_COLOR colorWaveLineCenter;

     short nWaveLineIntensityFactor;

     OLE_COLOR colorWaveBackground;

     short bUseHalfColorsForPeaks;

     short bAppearance3d;

     OLE_COLOR colorPositionLine;

     OLE_COLOR colorBorder;

     short bPositionLineShow;

     long nPositionLineDashStyle;

     short nPositionLineWidth;

     long nPositionLineHighCap;

     long nPositionLineLowCap;

     long nPositionLineDashCap;

     short nPositionLineTranspFactor;

     long nGraphicItemsMask;

     long nUpdateSpeed;

     float fVerticalZoomFactor;

} WSCROLLER_SETTINGS;

Visual Basic definition

Public Type WSCROLLER_SETTINGS

    nStereoVisualizationMode as enumWaveformStereoModes

    colorWaveLinePeak as OLE_COLOR

    colorWaveLineCenter as OLE_COLOR

    nWaveLineIntensityFactor as Integer

    colorWaveBackground as OLE_COLOR

    bUseHalfColorsForPeaks as Boolean

    bAppearance3d as Boolean

    colorPositionLine as OLE_COLOR

    colorBorder as OLE_COLOR

    bPositionLineShow as Boolean

    nPositionLineDashStyle as enumWaveformLineDashStyles

    nPositionLineWidth as Integer

    nPositionLineHighCap as enumLineCaps

    nPositionLineLowCap as enumLineCaps

    nPositionLineDashCap as enumLineDashCaps

    nPositionLineTranspFactor as Integer

    nGraphicItemsMask as enumGraphicItemMaskValues

    nUpdateSpeed as enumWaveScrollerAutoUpdate

    fVerticalZoomFactor as Single

End Type

Member

Description

nStereoVisualizationMode

Visualization mode used for displaying stereo sounds

Supported values are the following:

Mnemonic constant | Value | Meaning
STEREO_MODE_CHANNELS_BOTH | 0 | Right and left channels are displayed separately .
STEREO_MODE_CHANNELS_LEFT | 1 | Only the left channel content is displayed on
STEREO_MODE_CHANNELS_RIGHT | 2 | Only the right channel content is displayed
STEREO_MODE_CHANNELS_MIXED (default) | 3 | Right and left channels contents are mixed together

colorWaveLinePeak

Color used for rendering peaks of the waveform line. See screenshot above.

colorWaveLineCenter

Color used for rendering the center of the waveform line. See screenshot above.

nWaveLineIntensityFactor

Factor of gradient intensity of the waveform line.

This value can range from 0 to 100 with a default value of 50. Values outside of this range will be automatically capped to the nearest valid value.

On the screenshot below you can appreciate the difference between the default value 50 (on the left) and a value of 20 (on the right):

colorWaveBackground

The color used to render the waveform background (default is set to Black). See screenshot above.

bUseHalfColorsForPeaks

Boolean value that specifies if waveform peaks will have a half intensity color.

This field is ignored when colors set into the colorWaveLinePeak and colorWaveLineCenter fields are different.

Supported values are the following:

Value | Meaning
False | Don't use half color for drawing waveform peaks
True (default) | Use half color for drawing waveform peaks

bAppearance3d

Boolean value that specifies if the waveform scroller is displayed with 3D borders.

Supported values are the following:

Value | Meaning
False | Doesn't display 3D borders
True (default) | Displays 3D borders

colorPositionLine

The color used to render the central playback position line (default is set to White). See screenshot above.

colorBorder

The color used to render the border (only when the bAppearance3d parameter is set to False) (default is set to Black)

bPositionLineShow

Boolean value that specifies if the central playback position line must be shown or hidden.

Supported values are the following:

Value | Meaning
False | Hides the playback position line
True (default) | Shows the playback position line

nPositionLineDashStyle

Dash style of the line that indicates a selected position on the waveform.

Supported values are the following:

Mnemonic constant | Value | Meaning
LINE_DASH_STYLE_SOLID | 0 | Solid line.
LINE_DASH_STYLE_DASH | 1 | Dashed line.
LINE_DASH_STYLE_DOT | 2 | Dotted line.
LINE_DASH_STYLE_DASH_DOT | 3 | Alternating dash-dot line line.
LINE_DASH_STYLE_DASH_DOT_DOT | 4 | Alternating dash-dot-dot line line.

nPositionLineWidth

Width in pixels of the position line.

nPositionLineHighCap

Type of cap for the high end of the position line.

Supported values are the following:

Mnemonic constant | Value | Meaning
LINE_CAP_SQUARE | 0 | Specifies a square cap.
LINE_CAP_ROUND | 1 | Specifies a circular cap.
LINE_CAP_TRIANGLE | 2 | Specifies a triangular cap.
LINE_CAP_SQUARE_ANCHOR | 3 | Specifies that the line ends are anchored with a square.
LINE_CAP_ROUND_ANCHOR | 4 | Specifies that the line ends are anchored with a circle.
LINE_CAP_DIAMOND_ANCHOR | 5 | Specifies that the line ends are anchored with a diamond.
LINE_CAP_ARROW_ANCHOR | 6 | Specifies that the line ends are anchored with arrowheads.

nPositionLineLowCap

Type of cap for the low end of the position line.

Supported values are the same as seen for the nPositionLineHighCap field above.

nPositionLineDashCap

Type of dash/dot cap for the position line.

Supported values are the following:

Mnemonic constant | Value | Meaning
LINE_DASH_CAP_FLAT | 0 | Specifies a square cap that squares off both ends of each dash.
LINE_DASH_CAP_ROUND | 1 | Specifies a circular cap that rounds off both ends of each dash.
LINE_DASH_CAP_TRIANGLE | 2 | Specifies a triangular cap that points both ends of each dash.

nPositionLineTranspFactor

Transparent factor applied to the position line.

This value can range from 0 (total opacity) to 255 (total transparency). Values outside of this range will be automatically capped to the nearest valid value.

nGraphicItemsMask

Combination of values determining the mask of graphic items that must be drawn over the waveform scroller.

Supported values are the following:

Mnemonic constant | Value | Meaning
MASK_GRAPHIC_ITEM_NONE | 0 | No graphic item is drawn
MASK_GRAPHIC_ITEM_VERTICAL_LINE (default) | 1 | Draws vertical lines
MASK_GRAPHIC_ITEM_HORIZONTAL_LINE | 2 | Draws horizontal lines
MASK_GRAPHIC_ITEM_WAVE_RANGE | 4 | Draw wave ranges

nUpdateSpeed

Value that determines how much frequently the waveform is updated during playback. The higher the update speed, the higher the needed CPU amount.

Supported values are the following:

Mnemonic constant | Value | Meaning
WAVEFORMSCROLLER_UPDATE_ULTRA_FAST | 0 | .Update occurs every 15 milliseconds
WAVEFORMSCROLLER_UPDATE_VERY_FAST | 1 | .Update occurs every 30 milliseconds
WAVEFORMSCROLLER_UPDATE_FAST (default) | 2 | .Update occurs every 45 milliseconds
WAVEFORMSCROLLER_UPDATE_MIDDLE | 3 | .Update occurs every 60 milliseconds
WAVEFORMSCROLLER_UPDATE_SLOW | 4 | .Update occurs every 75 milliseconds
WAVEFORMSCROLLER_UPDATE_VERY_SLOW | 5 | .Update occurs every 90 milliseconds
WAVEFORMSCROLLER_UPDATE_ULTRA_SLOW | 6 | .Update occurs every 105 milliseconds

fVerticalZoomFactor

Factor applied to vertical zooming operations. can assume values ranging from 0.5 to 5. Values outside of this range will be automatically capped to the nearest valid value. The default value is set to 1.

- Values smaller than 1 will vertically zoom-out the waveform, reducing its vertical size

- Value 1 will display the waveform without zooming

- Values higher than 1 will vertically zoom-in the waveform, increasing its vertical size


WANALYZER_BUDDY_PICTURE structure

WANALYZER_BUDDY_PICTURE structure

The WANALYZER_BUDDY_PICTURE structure describes settings applied to a "buddy" picture assigned to a graphic item, available on the Waveform Analyzer, through one between the GraphicItemBuddyPictureSetFromFile,GraphicItemBuddyPictureSetFromMemory or GraphicItemBuddyPictureSetFromHandle methods. The current settings of the "buddy" picture can be retrieved through the GraphicItemBuddyPictureParamsGet method and modified through the GraphicItemBuddyPictureParamsSet method.

Visual C++ definition

typedef struct

{

OLE_COLOR colorTransp;

short nTranspFactor;

long nAlignment;

long nResizeWidth;

long nResizeHeight;

short bKeepVisible;

} WANALYZER_BUDDY_PICTURE;

This data structure is defined inside the WavMmsEngDef.h header file which can be found inside the product's Include directory (default C:\Program Files\Active Waveform Analyzer\include).

Visual Basic definition

Public Type WANALYZER_BUDDY_PICTURE

colorTransp As OLE_COLOR

nTranspFactor As Integer

nAlignment as enumBuddyAlignment

nResizeWidth as Long

nResizeHeight as Long

bKeepVisible as Boolean

End Type

This data structure is defined inside the AsoedDef.bas module file which can be found inside the product's Include directory (default C:\Program Files\Active Sound Recorder\include).

Member

Description

colorTransp

Color of the picture rendered as transparent.

nTranspFactor

Transparent factor. This value can range from 0 (total opacity) to 255 (total transparency). Values outside of this range will be automatically capped to the nearest valid value.

nAlignment

Alignment respect to the graphic item.

Supported values are the following:

Mnemonic constant | Value | Meaning
BUDDY_ALIGN_LEFT_TOP | 0 | Buddy element is left-top aligned
BUDDY_ALIGN_CENTER_TOP | 1 | Buddy element is center-top aligned
BUDDY_ALIGN_RIGHT_TOP | 2 | Buddy element is right-top aligned
BUDDY_ALIGN_LEFT_MIDDLE | 3 | Buddy element is left-middle aligned
BUDDY_ALIGN_CENTER_MIDDLE | 4 | Buddy element is center-middle aligned
BUDDY_ALIGN_RIGHT_MIDDLE | 5 | Buddy element is right-center aligned
BUDDY_ALIGN_LEFT_BOTTOM | 6 | Buddy element is left-bottom aligned
BUDDY_ALIGN_CENTER_BOTTOM | 7 | Buddy element is center-bottom aligned
BUDDY_ALIGN_RIGHT_BOTTOM | 8 | Buddy element is right-bottom aligned

nResizeWidth

Resize width in pixels (0 use original width).

nResizeHeight

Resize height in pixels (0 use original height).

bKeepVisible

Boolean value that specifies if the picture is kept visible when reaching the limits of the waveform visible range.

Supported values are the following:

Mnemonic constant | Meaning
False | The picture is not kept visible
True | The picture is kept visible


WANALYZER_BUDDY_TEXT structure

WANALYZER_BUDDY_TEXT structure

The WANALYZER_BUDDY_TEXT structure describes settings applied to a "buddy" text assigned to a graphic item, available on the Waveform Analyzer, through the GraphicItemBuddyTextSet method. The current settings of the "buddy" text can be retrieved through the GraphicItemBuddyTextParamsGet method and modified through the GraphicItemBuddyTextParamsSet method.

Visual C++ definition

typedef struct

{

OLE_COLOR colorText;

OLE_COLOR colorTextOutline;

short nOutlineWidth;

short nTranspFactor;

long nAlignment;

short bKeepVisible;

} WANALYZER_BUDDY_TEXT;

This data structure is defined inside the WavMmsEngDef.h header file which can be found inside the product's Include directory (default C:\Program Files\Active Waveform Analyzer\include).

Visual Basic definition

Public Type WANALYZER_BUDDY_TEXT

colorText As OLE_COLOR

colorTextOutline As OLE_COLOR

nOutlineWidth as Integer

nTranspFactor As Integer

nAlignment as enumBuddyAlignment

bKeepVisible as Boolean

End Type

This data structure is defined inside the AsoedDef.bas module file which can be found inside the product's Include directory (default C:\Program Files\Active Sound Recorder\include).

Member

Description

colorText

Text color

colorTextOutline

Text outline color. If this color is set to a value identical to the colorText field, no outline is rendered.

nOutlineWidth

Text outline width in pixels. If this field is set to 0, no outline is rendered.

nTranspFactor

Transparent factor. This value can range from 0 (total opacity) to 255 (total transparency). Values outside of this range will be automatically capped to the nearest valid value.

nAlignment

Alignment respect to the graphic item.

Supported values are the following:

Mnemonic constant | Value | Meaning
BUDDY_ALIGN_LEFT_TOP | 0 | Buddy element is left-top aligned
BUDDY_ALIGN_CENTER_TOP | 1 | Buddy element is center-top aligned
BUDDY_ALIGN_RIGHT_TOP | 2 | Buddy element is right-top aligned
BUDDY_ALIGN_LEFT_MIDDLE | 3 | Buddy element is left-middle aligned
BUDDY_ALIGN_CENTER_MIDDLE | 4 | Buddy element is center-middle aligned
BUDDY_ALIGN_RIGHT_MIDDLE | 5 | Buddy element is right-center aligned
BUDDY_ALIGN_LEFT_BOTTOM | 6 | Buddy element is left-bottom aligned
BUDDY_ALIGN_CENTER_BOTTOM | 7 | Buddy element is center-bottom aligned
BUDDY_ALIGN_RIGHT_BOTTOM | 8 | Buddy element is right-bottom aligned

bKeepVisible

Boolean value that specifies if the buddy text is kept visible when reaching the limits of the waveform visible range.

Supported values are the following:

Mnemonic constant | Meaning
False | The buddy text is not kept visible
True | The buddy text is kept visible


WANALYZER_HORIZONTAL_LINE structure

WANALYZER_HORIZONTAL_LINE structure

The WANALYZER_HORIZONTAL_LINE structure describes settings applied to a horizontal line added to the Waveform Analyzer through the GraphicItemHorizontalLineAdd. The current settings can be retrieved through the GraphicItemHorizontalLineParamsGet method and modified through the GraphicItemHorizontalLineParamsSet method.

Visual C++ definition

typedef struct

{

OLE_COLOR color;

long nChannel;

long nDashStyle;

short nHeightInPix;

short nTranspFactor;

short nVertPosInPerc;

long nLeftCap;

long nRightCap;

long nDashCap;

} WANALYZER_HORIZONTAL_LINE;

This data structure is defined inside the WavMmsEngDef.h header file which can be found inside the product's Include directory (default C:\Program Files\Active Waveform Analyzer\include).

Visual Basic definition

Public Type WANALYZER_HORIZONTAL_LINE

color As OLE_COLOR

nChannel As enumHorizontalLineChannel

nDashStyle As enumWaveformLineDashStyles

nHeightInPix As Integer

nTranspFactor As Integer

nVertPosInPerc As Integer

nLeftCap As enumLineCaps

nRightCap As enumLineCaps

nDashCap As enumLineDashCaps

End Type

This data structure is defined inside the AsoedDef.bas module file which can be found inside the product's Include directory (default C:\Program Files\Active Sound Recorder\include).

Member

Description

color

Color used for rendering the line.

nChannel

Audio channel on which the horizontal line is drawn.

Supported values are the following:

Mnemonic constant | Numeric value | Meaning
HORZ_LINE_CHANNEL_ALL | 0 | The horizontal line is drawn on all channels
HORZ_LINE_CHANNEL_LEFT | 1 | The horizontal line is drawn on the left channel only
HORZ_LINE_CHANNEL_RIGHT | 2 | The horizontal line is drawn on the right channel only

nDashStyle

Line dash style.

Supported values are the following:

Mnemonic constant | Value | Meaning
LINE_DASH_STYLE_SOLID | 0 | Solid line.
LINE_DASH_STYLE_DASH | 1 | Dashed line.
LINE_DASH_STYLE_DOT | 2 | Dotted line.
LINE_DASH_STYLE_DASH_DOT | 3 | Alternating dash-dot line line.
LINE_DASH_STYLE_DASH_DOT_DOT | 4 | Alternating dash-dot-dot line line.

On the screenshot below you can see the different types of horizontal lines with the corresponding value displayed on the buddy text:

nHeightInPix

Height of the line expressed in pixels.

nTranspFactor

Transparent factor. This value can range from 0 (total opacity) to 255 (total transparency). Values outside of this range will be automatically capped to the nearest valid value.

nVertPosInPerc

Vertical position of the line expressed in percentage of wave amplitude.

May assume values from -100 to 100: a negative value indicates that the line should be drawn over negative waveform peaks.

In case you should be willing the set the line position based upon a logarithmic scale, you could convert your value in dB to a value in percentage using the following formula:

ValueInPerc = 100 * pow (10, ValueInDB/20);

On the screenshot below you can see 3 horizontal lines, 2 on positive peaks, respectively at 70% and 25% of the waveform amplitude, and one on negative peaks at -80% of the waveform amplitude.

nLeftCap

Type of cap for the left end of the line.

Supported values are the following:

Mnemonic constant | Value | Meaning
LINE_CAP_SQUARE | 0 | Specifies a square cap.
LINE_CAP_ROUND | 1 | Specifies a circular cap.
LINE_CAP_TRIANGLE | 2 | Specifies a triangular cap.
LINE_CAP_SQUARE_ANCHOR | 3 | Specifies that the line ends are anchored with a square.
LINE_CAP_ROUND_ANCHOR | 4 | Specifies that the line ends are anchored with a circle.
LINE_CAP_DIAMOND_ANCHOR | 5 | Specifies that the line ends are anchored with a diamond.
LINE_CAP_ARROW_ANCHOR | 6 | Specifies that the line ends are anchored with arrowheads.

On the screenshot below you can see the different types of line caps with the corresponding value displayed on the buddy text:

nRightCap

Type of cap for the right end of the line.

Supported values are the same as seen for the nLeftCap field above.

nDashCap

Type of dash/dot cap for the line.

Supported values are the following:

Mnemonic constant | Value | Meaning
LINE_DASH_CAP_FLAT | 0 | Specifies a square cap that squares off both ends of each dash.
LINE_DASH_CAP_ROUND | 1 | Specifies a circular cap that rounds off both ends of each dash.
LINE_DASH_CAP_TRIANGLE | 2 | Specifies a triangular cap that points both ends of each dash.

On the screenshot below you can see the different types of line dash caps with the corresponding value displayed on the buddy text:


WANALYZER_VERTICAL_LINE structure

WANALYZER_VERTICAL_LINE structure

The WANALYZER_VERTICAL_LINE structure describes settings applied to a vertical line added to the Waveform Analyzer through the GraphicItemVerticalLineAdd method. The current settings can be retrieved through the GraphicItemVerticalLineParamsGet method and modified through the GraphicItemVerticalLineParamsSet method.

Visual C++ definition

typedef struct

{

OLE_COLOR color;

long nDashStyle;

short nWidth;

short nTranspFactor;

long nHighCap;

long nLowCap;

long nDashCap;

} WANALYZER_VERTICAL_LINE;

This data structure is defined inside the WavMmsEngDef.h header file which can be found inside the product's Include directory (default C:\Program Files\Active Waveform Analyzer\include).

Visual Basic definition

Public Type WANALYZER_VERTICAL_LINE

color As OLE_COLOR

nDashStyle As enumWaveformLineDashStyles

nWidth As Integer

nTranspFactor As Integer

nHighCap As enumLineCaps

nLowCap As enumLineCaps

nDashCap As enumLineDashCaps

End Type

This data structure is defined inside the AsoedDef.bas module file which can be found inside the product's Include directory (default C:\Program Files\Active Sound Recorder\include).

Member

Description

color

Color used for rendering the line.

nDashStyle

Line dash style.

Supported values are the following:

Mnemonic constant | Value | Meaning
LINE_DASH_STYLE_SOLID | 0 | Solid line.
LINE_DASH_STYLE_DASH | 1 | Dashed line.
LINE_DASH_STYLE_DOT | 2 | Dotted line.
LINE_DASH_STYLE_DASH_DOT | 3 | Alternating dash-dot line line.
LINE_DASH_STYLE_DASH_DOT_DOT | 4 | Alternating dash-dot-dot line line.

On the screenshot below you can see the different types of vertical lines with the corresponding value displayed on the buddy text:

nWidth

Line width in pixels.

nTranspFactor

Transparent factor. This value can range from 0 (total opacity) to 255 (total transparency). Values outside of this range will be automatically capped to the nearest valid value.

nHighCap

Type of cap for the high end of the line.

Supported values are the following:

Mnemonic constant | Value | Meaning
LINE_CAP_SQUARE | 0 | Specifies a square cap.
LINE_CAP_ROUND | 1 | Specifies a circular cap.
LINE_CAP_TRIANGLE | 2 | Specifies a triangular cap.
LINE_CAP_SQUARE_ANCHOR | 3 | Specifies that the line ends are anchored with a square.
LINE_CAP_ROUND_ANCHOR | 4 | Specifies that the line ends are anchored with a circle.
LINE_CAP_DIAMOND_ANCHOR | 5 | Specifies that the line ends are anchored with a diamond.
LINE_CAP_ARROW_ANCHOR | 6 | Specifies that the line ends are anchored with arrowheads.

On the screenshot below you can see the different types of line caps with the corresponding value displayed on the buddy text:

nLowCap

Type of cap for the low end of the line.

Supported values are the same as seen for the nHighCap field above.

nDashCap

Type of dash/dot cap for the line.

Supported values are the following:

Mnemonic constant | Value | Meaning
LINE_DASH_CAP_FLAT | 0 | Specifies a square cap that squares off both ends of each dash.
LINE_DASH_CAP_ROUND | 1 | Specifies a circular cap that rounds off both ends of each dash.
LINE_DASH_CAP_TRIANGLE | 2 | Specifies a triangular cap that points both ends of each dash.

On the screenshot below you can see the different types of line dash caps with the corresponding value displayed on the buddy text:


WANALYZER_WAVE_RANGE structure

WANALYZER_WAVE_RANGE structure

The WANALYZER_WAVE_RANGE structure describes settings applied to a waveform range added to the Waveform Analyzer through the GraphicItemWaveRangeAdd method. The current settings can be retrieved through the GraphicItemWaveRangeParamsGet method and modified through the GraphicItemWaveRangeParamsSet t method.

Visual C++ definition

typedef struct

{

OLE_COLOR colorBack;

OLE_COLOR colorWaveLinePeak;

OLE_COLOR colorWaveLineCenter;

} WANALYZER_WAVE_RANGE;

This data structure is defined inside the WavMmsEngDef.h header file which can be found inside the product's Include directory (default C:\Program Files\Active Waveform Analyzer\include).

Visual Basic definition

Public Type WANALYZER_WAVE_RANGE

colorBack As OLE_COLOR

colorWaveLinePeak As OLE_COLOR

colorWaveLineCenter As OLE_COLOR

End Type

This data structure is defined inside the AsoedDef.bas module file which can be found inside the product's Include directory (default C:\Program Files\Active Sound Recorder\include).

Inside the screenshot below you can see 2 examples of wave ranges, each with its own set of colors. Please note that "wave ranges" are a different concept respect to "waveform selection": you can only have one single "waveform selection", whose positioning can be managed through code or through mouse movement, but you can have multiple "wave ranges" managed through code without any mouse management for changing the positioning.

Member | Description
colorBack | Color used for rendering the waveform background.
colorWaveLinePeak | Color used for rendering the peak of the waveform line
colorWaveLineCenter | Color used for rendering the center of the waveform line

NOTE: If values of the colorWaveLineCenter e colorWaveLinePeak fields should be identical, the rendering would keep count of the bUseHalfColorsForPeaks field of the WANALYZER_WAVEFORM_SETTINGS data structure.


WANALYZER_GENERAL_SETTINGS structure

WANALYZER_GENERAL_SETTINGS structure

The WANALYZER_GENERAL_SETTINGS structure describes the general settings applied to the Waveform Analyzer. The current settings can be retrieved through the SettingsGeneralGet method and modified through the SettingsGeneralSet method.

Visual C++ definition

typedef struct

{

short bAppearance3d;

long nResolution;

float fHorizontalZoomFactor;

float fVerticalZoomFactor;

short nPositionLineWidth;

long nPositionLineDashStyle;

OLE_COLOR colorPositionLine;

short bPlaybackLineVisible;

short nPlaybackLineWidth;

long nPlaybackLineDashStyle;

OLE_COLOR colorPlaybackLine;

long nPositionLineHighCap;

long nPositionLineLowCap;

long nPositionLineDashCap;

short nPositionLineTranspFactor;

long nPlaybackLineHighCap;

long nPlaybackLineLowCap;

long nPlaybackLineDashCap;

short nPlaybackLineTranspFactor;

short bVerticalLinesOnTimeRuler;

short bAutoRefresh;

} WANALYZER_GENERAL_SETTINGS;

This data structure is defined inside the WavMmsEngDef.h header file which can be found inside the product's Include directory (default C:\Program Files\Active Waveform Analyzer\include).

Visual Basic definition

Public Type WANALYZER_GENERAL_SETTINGS

bAppearance3d as Boolean

nResolution as enumAnalyzerResolutions

fHorizontalZoomFactor as Single

fVerticalZoomFactor as  Single

nPositionLineWidth as Integer

nPositionLineDashStyle as enumWaveformLineDashStyles

colorPositionLine as OLE_COLOR

bPlaybackLineVisible as Boolean

nPlaybackLineWidth as Integer

nPlaybackLineDashStyle as enumWaveformLineDashStyles

colorPlaybackLine as OLE_COLOR

nPositionLineHighCap as enumLineCaps

nPositionLineLowCap as enumLineCaps

nPositionLineDashCap as enumLineDashCaps

nPositionLineTranspFactor as Integer

nPlaybackLineHighCap as enumLineCaps

nPlaybackLineLowCap as enumLineCaps

nPlaybackLineDashCap as enumLineDashCaps

nPlaybackLineTranspFactor as Integer

bVerticalLinesOnTimeRuler as Boolean

bAutoRefresh as Boolean

End Type

This data structure is defined inside the AsoedDef.bas module file which can be found inside the product's Include directory (default C:\Program Files\Active Sound Recorder\include).

Member

Description

bAppearance3d

Boolean value that specifies if the Waveform Analyzer is displayed with 3D borders.

Supported values are the following:

Mnemonic constant | Meaning
False | Doesn't display 3D borders
True | Displays 3D borders

nResolution

Resolution used for waveform's analysis.

Supported values are the following:

Mnemonic constant | Value | Meaning
WAVEANALYZER_RES_MINIMUM | 100 | Minimum resolution, faster calculation time. Each line on the analyzer is the average for 256 PCM samples.
WAVEANALYZER_RES_VERY_LOW | 101 | Very low resolution. Each line on the analyzer is the average for 128 PCM samples.
WAVEANALYZER_RES_LOW | 102 | Low resolution. Each line on the analyzer is the average for 64 PCM samples.
WAVEANALYZER_RES_MIDDLE | 103 | Middle resolution. Each line on the analyzer is the average for 32 PCM samples.
WAVEANALYZER_RES_HIGH | 104 | High resolution. Each line on the analyzer is the average for 16 PCM samples.
WAVEANALYZER_RES_VERY_HIGH | 105 | Very high resolution. Each line on the analyzer is the average for 8 PCM samples.
WAVEANALYZER_RES_MAXIMUM | 106 | Maximum resolution, slower calculation time. Each line on the analyzer is the average for 4 PCM samples.

fHorizontalZoomFactor

Floating point value indicating the factor applied to zooming operations: by default the zoom factor is 2.0.

The value of this field cannot be lower than 1.01. Smaller values will be automatically capped to 1.01.

fVerticalZoomFactor

Factor applied to vertical zooming operations. can assume values ranging from 0.5 to 5. Values outside of this range will be automatically capped to the nearest valid value.

- Values smaller than 1 will vertically zoom-out the waveform, reducing its vertical size

- Value 1 will display the waveform without zooming (default)

- Values higher than 1 will vertically zoom-in the waveform, increasing its vertical size

nPositionLineWidth

Width in pixels of the line that indicates a selected position on the waveform

nPositionLineDashStyle

Dash style of the line that indicates a selected position on the waveform.

Supported values are the following:

Mnemonic constant | Value | Meaning
LINE_DASH_STYLE_SOLID | 0 | Solid line.
LINE_DASH_STYLE_DASH | 1 | Dashed line.
LINE_DASH_STYLE_DOT | 2 | Dotted line.
LINE_DASH_STYLE_DASH_DOT | 3 | Alternating dash-dot line line.
LINE_DASH_STYLE_DASH_DOT_DOT | 4 | Alternating dash-dot-dot line line.

On the screenshot below you can see the different dash styles with the corresponding value displayed:

colorPositionLine

Color used for rendering the line that indicates a selected position on the waveform.

bPlaybackLineVisible

Boolean value that specifies if the line that indicates the playback position is visible during a playback session.

Supported values are the following:

Mnemonic constant | Meaning
False | Doesn't display the position line during playback
True | Displays the position line during playback

nPlaybackLineWidth

Width in pixels of the playback line

nPlaybackLineDashStyle

Dash style of the line that indicates the playback position on the waveform during a playback session.

Supported values are the same as seen for the nPositionLineDashStyle field above.

colorPlaybackLine

Color used for rendering the line that indicates the playback position on the waveform during a playback session.

nPositionLineHighCap

Type of cap for the high end of the position line.

Supported values are the following:

Mnemonic constant | Value | Meaning
LINE_CAP_SQUARE | 0 | Specifies a square cap.
LINE_CAP_ROUND | 1 | Specifies a circular cap.
LINE_CAP_TRIANGLE | 2 | Specifies a triangular cap.
LINE_CAP_SQUARE_ANCHOR | 3 | Specifies that the line ends are anchored with a square.
LINE_CAP_ROUND_ANCHOR | 4 | Specifies that the line ends are anchored with a circle.
LINE_CAP_DIAMOND_ANCHOR | 5 | Specifies that the line ends are anchored with a diamond.
LINE_CAP_ARROW_ANCHOR | 6 | Specifies that the line ends are anchored with arrowheads.

On the screenshot below you can see the different types of line caps with the corresponding value displayed:

nPositionLineLowCap

Type of cap for the low end of the position line.

Supported values are the same as seen for the nPositionLineHighCap field above.

nPositionLineDashCap

Type of dash/dot cap for the position line.

Supported values are the following:

Mnemonic constant | Value | Meaning
LINE_DASH_CAP_FLAT | 0 | Specifies a square cap that squares off both ends of each dash.
LINE_DASH_CAP_ROUND | 1 | Specifies a circular cap that rounds off both ends of each dash.
LINE_DASH_CAP_TRIANGLE | 2 | Specifies a triangular cap that points both ends of each dash.

On the screenshot below you can see the different types of line dash caps with the corresponding value displayed:

nPositionLineTranspFactor

Transparent factor applied to the position line.

This value can range from 0 (total opacity) to 255 (total transparency). Values outside of this range will be automatically capped to the nearest valid value.

nPlaybackLineHighCap

Type of cap for the high end of the playback line.

Supported values are the same as seen for the nPositionLineHighCap field above.

nPlaybackLineLowCap

Type of cap for the low end of the playback line.

Supported values are the same as seen for the nPositionLineHighCap field above.

nPlaybackLineDashCap

Type of dash/dot cap for the playback line.

Supported values are the same as seen for the nPositionLineDashCap field above.

nPlaybackLineTranspFactor

Transparent factor applied to the playback line.

This value can range from 0 (total opacity) to 255 (total transparency). Values outside of this range will be automatically capped to the nearest valid value.

bVerticalLinesOnTimeRuler

Boolean value that specifies if caps of vertical lines must be rendered over time rulers.

Supported values are the following:

Mnemonic constant | Meaning
False (default) | Caps of vertical lines must be rendered over time rulers.
True | Caps of vertical lines must be rendered over the waveform are without exceeding over time rulers..

bAutoRefresh

Boolean value that specifies if the waveform is refreshed automatically during the analysis phase.

Supported values are the following:

Mnemonic constant | Meaning
False (default) | Auto-refresh is disabled.
True | Auto-refresh is enabled.


WANALYZER_RULERS_SETTINGS structure

WANALYZER_RULERS_SETTINGS structure

The WANALYZER_RULERS_SETTINGS structure describes settings applied while rendering the time and amplitude rulers on the Waveform Analyzer. The current settings can be retrieved through the SettingsRulersGet method and modified through the SettingsRulersSet method.

Visual C++ definition

typedef struct

{

     long nAmplitudeScale;

     short bVisibleLeft;

     short bTicksLeft;

     short bVisibleRight;

     short bTicksRight;

     short bVisibleTop;

     short bTicksTop;

     short bVisibleBottom;

     short bTicksBottom;

     OLE_COLOR colorBackground;

     OLE_COLOR colorTicks;

     OLE_COLOR colorText;

     short nTopRulerHeightInPix;

     short nBottomRulerHeightInPix;

     short nVertRulerWidthInPix;

     float fTimeTicksFrequencyInPix;

} WANALYZER_RULERS_SETTINGS;

This data structure is defined inside the WavMmsEngDef.h header file which can be found inside the product's Include directory (default C:\Program Files\Active Waveform Analyzer\include).

Visual Basic definition

Public Type WANALYZER_RULERS_SETTINGS

    nAmplitudeScale as enumVolumeScales

    bVisibleLeft as Boolean

    bTicksLeft as Boolean

    bVisibleRight as Boolean

    bTicksRight as Boolean

    bVisibleTop as Boolean

    bTicksTop as Boolean

    bVisibleBottom as Boolean

    bTicksBottom as Boolean

    colorBackground as OLE_COLOR

    colorTicks as OLE_COLOR

    colorText as OLE_COLOR

    nTopRulerHeightInPix as Integer

    nBottomRulerHeightInPix as Integer

    nVertRulerWidthInPix as Integer

    fTimeTicksFrequencyInPix as Single

End Type

This data structure is defined inside the AsoedDef.bas module file which can be found inside the product's Include directory (default C:\Program Files\Active Sound Recorder\include).

Member

Description

nAmplitudeScale

Scale used for vertical rulers indicating waveform amplitude.

Supported values are the following:

Mnemonic constant | Value | Meaning
SCALE_LINEAR (default) | 0 | Linear mode
SCALE_LOG | 1 | Logarithmic mode

bVisibleLeft

Boolean value that specifies if the left amplitude ruler is visible.

Supported values are the following:

Mnemonic constant | Meaning
False | Doesn't display left amplitude ruler
True (default) | Displays left amplitude ruler

bTicksLeft

Boolean value that specifies if the left amplitude ruler has ticks.

Supported values are the following:

Mnemonic constant | Meaning
False | Doesn't display ticks for the left amplitude ruler
True (default) | Displays ticks for the left amplitude ruler

bVisibleRight

Boolean value that specifies if the right amplitude ruler is visible.

Supported values are the following:

Mnemonic constant | Meaning
False | Doesn't display right amplitude ruler
True (default) | Displays right amplitude ruler

bTicksRight

Boolean value that specifies if the right amplitude ruler has ticks.

Supported values are the following:

Mnemonic constant | Meaning
False | Doesn't display ticks for the right amplitude ruler
True (default) | Displays ticks for the right amplitude ruler

bVisibleTop

Boolean value that specifies if the top time ruler is visible.

Supported values are the following:

Mnemonic constant | Meaning
False | Doesn't display top time ruler
True (default) | Displays top time ruler

bTicksTop

Boolean value that specifies if the top time ruler has ticks.

Supported values are the following:

Mnemonic constant | Meaning
False | Doesn't display ticks for the top time ruler
True (default) | Displays ticks for the top time ruler

bVisibleBottom

Boolean value that specifies if the bottom time ruler is visible.

Supported values are the following:

Mnemonic constant | Meaning
False | Doesn't display bottom time ruler
True (default) | Displays bottom time ruler

bTicksBottom

Boolean value that specifies if the bottom time ruler has ticks.

Supported values are the following:

Mnemonic constant | Meaning
False | Doesn't display ticks for the bottom time ruler
True (default) | Displays ticks for the bottom time ruler

colorBackground

Color used for rendering the rulers background.

colorTicks

Color used for rendering rulers ticks.

colorText

Color used for rendering rulers texts.

nTopRulerHeightInPix

Height of the top time ruler in pixels.

The default value is 16 pixels.

nBottomRulerHeightInPix

Height of the bottom time ruler in pixels.

The default value is 16 pixels.

nVertRulerWidthInPix

Width of vertical amplitude rulers in pixels.

The default value is 41 pixels.

fTimeTicksFrequencyInPix

Frequency of the time ticks in pixels.

The default value is 40 pixels.


WANALYZER_SCROLLBARS_SETTINGS structure

WANALYZER_SCROLLBARS_SETTINGS structure

The WANALYZER_SCROLLBARS_SETTINGS structure describes settings applied while rendering the scrollbars on the Waveform Analyzer. The current settings can be retrieved through the SettingsScrollbarsGet method and modified through the SettingsScrollbarsSet method.

Visual C++ definition

typedef struct

{

     short nHeightInPixels;

     long nType;

     long nGraphicItemsMask;

     short bVisibleTop;

     short bVisibleBottom;

     OLE_COLOR colorBackground;

     OLE_COLOR colorThumb;

     OLE_COLOR colorVisibleRange;

     long nVisibleRangeType;

     short nVisibleRangeTranspGlassFactor;

     short nVisibleRangeLinesWidth;

     short bReserved;

     long nTransparentGlassType;

     short nTransparentGlassPos3D;

     short bTransparentGlassInvert3D;

} WANALYZER_SCROLLBARS_SETTINGS;

This data structure is defined inside the WavMmsEngDef.h header file which can be found inside the product's Include directory (default C:\Program Files\Active Waveform Analyzer\include).

Visual Basic definition

Public Type WANALYZER_SCROLLBARS_SETTINGS

    nHeightInPixels as Integer

    nType as enumWaveScrollbarType

    nGraphicItemsMask as enumGraphicItemMaskValues

    bVisibleTop as Boolean

    bVisibleBottom as Boolean

    colorBackground as OLE_COLOR

    colorThumb as OLE_COLOR

    colorVisibleRange as OLE_COLOR

    nVisibleRangeType as enumScrollbarWaveVisibleRangeType

    nVisibleRangeTranspGlassFactor as Integer

    nVisibleRangeLinesWidth as Integer

    bReserved as Boolean

    nTransparentGlassType as enumTranspGlassType

    nTransparentGlassPos3D as Integer

    bTransparentGlassInvert3D as Boolean

End Type

This data structure is defined inside the AsoedDef.bas module file which can be found inside the product's Include directory (default C:\Program Files\Active Sound Recorder\include).

Member

Description

nHeightInPixels

Height of the scrollbars in pixels.

By default this value is set to 12.

If the nType field below is set to WSCROLLBAR_TYPE_RECT, this field cannot be set to a value smaller than 6.

If the nType field below is set to WSCROLLBAR_TYPE_WAVEFORM, this field cannot be set to a value smaller than 12.

Eventual smaller values will be automatically capped to the nearest valid value.

nType

Determines how the scrollbar is visualized.

Supported values are the following:

Mnemonic constant | Value | Meaning
WSCROLLBAR_TYPE_RECT (default) | 0 | Scrollbars are rendered as a 3D rectangle
WSCROLLBAR_TYPE_WAVEFORM | 1 | Scrollbars display a small sized representation of the full waveform

On the screenshots below you can see that two different types of scrollbar; in both cases you can resize the visible range by dragging the provided handles with the left mouse button:

nGraphicItemsMask

Combination of values determining the mask of graphic items that must be drawn on the waveform scrollbar.

By default this

Supported values are the following:

Mnemonic constant | Value | Meaning
MASK_GRAPHIC_ITEM_NONE (default) | 0 | No graphic item is drawn
MASK_GRAPHIC_ITEM_VERTICAL_LINE | 1 | Draws vertical lines
MASK_GRAPHIC_ITEM_HORIZONTAL_LINE | 2 | Draws horizontal lines
MASK_GRAPHIC_ITEM_WAVE_RANGE | 4 | Draw wave ranges

bVisibleTop

Boolean value that specifies if the top scrollbar is visible.

Supported values are the following:

Mnemonic constant | Meaning
BOOL_FALSE | Doesn't display top scrollbar
BOOL_TRUE (default) | Displays top scrollbar

bVisibleBottom

Boolean value that specifies if the bottom scrollbar is visible.Supported values are the following:

Mnemonic constant | Meaning
BOOL_FALSE | Doesn't display bottom scrollbar
BOOL_TRUE (default) | Displays bottom scrollbar

colorBackground

Color used for rendering the scrollbars background.

colorThumb

Color used for rendering the scrollbars thumb.

colorVisibleRange

Color used for rendering inside the scrollbars the waveform background for visible range.

This setting is ignored when the nType field above is set to a value different from WSCROLLBAR_TYPE_WAVEFORM.

nVisibleRangeType

Determines how the visible range of the waveform is displayed.

This setting is ignored when the nType field above is set to a value different from WSCROLLBAR_TYPE_WAVEFORM

Supported values are the following:

Mnemonic constant | Value | Meaning
SCROLL_WAVE_VISIBLE_LINES (default) | 0 | Displays two lines on top and bottom
SCROLL_WAVE_VISIBLE_LINE_TOP | 1 | Displays one line on top
SCROLL_WAVE_VISIBLE_LINE_BOTTOM | 2 | Displays one line on bottom
SCROLL_WAVE_VISIBLE_TRANSP_GLASS_INNER | 3 | Displays a transparent glass over the portion of waveform representing the visible range
SCROLL_WAVE_VISIBLE_TRANSP_GLASS_OUTER | 4 | Displays a transparent glass over portions of waveform representing ranges of the waveform outside of the visible area.

nVisibleRangeTranspGlassFactor

Transparent factor applied to the transparent glass.

This value can range from 0 (total opacity) to 255 (total transparency) with a default value of 128. Values outside of this range will be automatically capped to the nearest valid value.

This setting is ignored when the nType field above is set to a value different from WSCROLLBAR_TYPE_WAVEFORM.

This setting is ignored when the nVisibleRangeType field above is set to a value different from SCROLL_WAVE_VISIBLE_TRANSP_GLASS_INNER or SCROLL_WAVE_VISIBLE_TRANSP_GLASS_OUTER.

nVisibleRangeLinesWidth

Width of lines in pixels.

Cannot assume values smaller than 1. The default value is 2.

This setting is ignored when the nType field above is set to a value different from WSCROLLBAR_TYPE_WAVEFORM.

This setting is ignored when the nVisibleRangeType field above is set to SCROLL_WAVE_VISIBLE_TRANSP_GLASS_INNER or SCROLL_WAVE_VISIBLE_TRANSP_GLASS_OUTER.

bReserved

Reserved for future uses.

nTransparentGlassType

Type of transparent glass.

Supported values are the following:

Mnemonic constant | Value | Meaning
TRANSP_GLASS_TYPE_FLAT | 0 | Flat glass.
TRANSP_GLASS_TYPE_3D_VERT (default) | 1 | 3D vertical glass.
TRANSP_GLASS_TYPE_3D_HORZ | 2 | 3D horizontal glass.

This setting is ignored when the nType field above is set to a value different from WSCROLLBAR_TYPE_WAVEFORM.

This setting is ignored when the nVisibleRangeType field above is set to a value different from SCROLL_WAVE_VISIBLE_TRANSP_GLASS_INNER or SCROLL_WAVE_VISIBLE_TRANSP_GLASS_OUTER.

nTransparentGlassPos3D

Position of the 3D effect for the transparent glass.

This value can range from 0 to 100 with a default value of 50. Values outside of this range will be automatically capped to the nearest valid value.

This setting is ignored when the nType field above is set to a value different from WSCROLLBAR_TYPE_WAVEFORM.

This setting is ignored when the nVisibleRangeType field above is set to a value different from SCROLL_WAVE_VISIBLE_TRANSP_GLASS_INNER or SCROLL_WAVE_VISIBLE_TRANSP_GLASS_OUTER.

nTransparentGlassInvert3D

Boolean value that specifies if the transparency of the 3D effect is inverted.

Supported values are the following:

Mnemonic constant | Meaning
BOOL_FALSE (default) | Doesn't invert 3D effect
BOOL_TRUE | Inverts 3D effect

This setting is ignored when the nType field above is set to a value different from WSCROLLBAR_TYPE_WAVEFORM.

This setting is ignored when the nVisibleRangeType field above is set to a value different from SCROLL_WAVE_VISIBLE_TRANSP_GLASS_INNER or SCROLL_WAVE_VISIBLE_TRANSP_GLASS_OUTER.


WANALYZER_WAVEFORM_SETTINGS structure

WANALYZER_WAVEFORM_SETTINGS structure

The WANALYZER_WAVEFORM_SETTINGS structure describes settings applied while rendering the waveform on the Waveform Analyzer. The current settings can be retrieved through the SettingsWaveGet method and modified through the SettingsWaveSet method.

Visual C++ definition

typedef struct

{

     long nStereoVisualizationMode;

     OLE_COLOR colorWaveLinePeak;

     OLE_COLOR colorWaveLineCenter;

     short nWaveLineIntensityFactor;

     OLE_COLOR colorWaveBackground;

     short bUseHalfColorsForPeaks;

     long nSelectionMode;

     OLE_COLOR colorWaveLineSelPeak;

     OLE_COLOR colorWaveLineSelCenter;

     OLE_COLOR colorWaveSelBackground;

     OLE_COLOR colorTransparentGlass;

     short nTransparentGlassFactor;

     OLE_COLOR colorVolumeLevelLine;

     OLE_COLOR colorTimeLine;

     long nTransparentGlassType;

     short nTransparentGlassPos3D;

     short bTransparentGlassInvert3D;

     short bDrawLinesOverWave;

} WANALYZER_WAVEFORM_SETTINGS;

This data structure is defined inside the WavMmsEngDef.h header file which can be found inside the product's Include directory (default C:\Program Files\Active Waveform Analyzer\include).

Visual Basic definition

Public Type WANALYZER_WAVEFORM_SETTINGS

    nStereoVisualizationMode as enumWaveformStereoModes

    colorWaveLinePeak as OLE_COLOR

    colorWaveLineCenter as OLE_COLOR

    nWaveLineIntensityFactor as Integer

    colorWaveBackground as OLE_COLOR

    bUseHalfColorsForPeaks as Boolean

    nSelectionMode as enumWaveformSelectionMode

    colorWaveLineSelPeak as OLE_COLOR

    colorWaveLineSelCenter as OLE_COLOR

    colorWaveSelBackground as OLE_COLOR

    colorTransparentGlass as OLE_COLOR

    nTransparentGlassFactor as Integer

    colorVolumeLevelLine as OLE_COLOR

    colorTimeLine as OLE_COLOR

    nTransparentGlassType as enumTranspGlassType

    nTransparentGlassPos3D as Integer

    bTransparentGlassInvert3D as Boolean

    bDrawLinesOverWave as Boolean

End Type

This data structure is defined inside the AsoedDef.bas module file which can be found inside the product's Include directory (default C:\Program Files\Active Sound Recorder\include).

On the screenshot A below you can see the various involved colors: the portion with blue background represents a selection:

Screenshot A

On the screenshot B below you can see the default colors with a selection rendered as a transparent glass.:

Screenshot B

Member

Description

nStereoVisualizationMode

Visualization mode used for displaying stereo sounds

Supported values are the following:

Mnemonic constant | Value | Meaning
STEREO_MODE_CHANNELS_BOTH (default) | 0 | Right and left channels are displayed separately on two different panes as seen on the pictures A and B above.
STEREO_MODE_CHANNELS_LEFT | 1 | Only the left channel content is displayed on a single pane
STEREO_MODE_CHANNELS_RIGHT | 2 | Only the right channel content is displayed on a single pane
STEREO_MODE_CHANNELS_MIXED | 3 | Right and left channels contents are mixed together and displayed on a single pane

colorWaveLinePeak

Color used for rendering peaks of the waveform line. See screenshot A above.

colorWaveLineCenter

Color used for rendering the center of the waveform line. See screenshot A above.

nWaveLineIntensityFactor

Factor of gradient intensity of the waveform line.

This value can range from 0 to 100 with a default value of 50. Values outside of this range will be automatically capped to the nearest valid value.

On the screenshot below you can appreciate the difference between the default value 50 (on the left) and a value of 20 (on the right):

colorWaveBackground

Color used for rendering the waveform background. See screenshot A above.

bUseHalfColorsForPeaks

Boolean value that specifies if waveform peaks will have a half intensity color.

This field is ignored when colors set into the colorWaveLinePeak and colorWaveLineCenter fields are different.

Supported values are the following:

Mnemonic constant | Meaning
False | Doesn't use half color for peaks
True (default) | Uses half color for peaks

nSelectionMode

Specifies how waveform selection is rendered. See screenshots A and B above.

Supported values are the following:

Mnemonic constant | Value | Meaning
WAVE_SEL_INVERT_COLORS (default) | 0 | Render selection by inverting waveform colors.
WAVE_SEL_TRANSPARENT_GLASS | 1 | Render selection simulating a transparent glass. See screenshot B above.
WAVE_SEL_CUSTOM_COLORS | 2 | Render selection by using custom colors. See screenshot A above.

colorWaveLineSelPeak

Color used for rendering gradient of peaks of the waveform line when selected. See screenshot A above.

This setting is ignored when the nSelectionMode field above is set to a value different from WAVE_SEL_CUSTOM_COLORS.

colorWaveLineSelCenter

Color used for rendering gradient of center of the waveform line when selected. See screenshot A above.

This setting is ignored when the nSelectionMode field above is set to a value different from WAVE_SEL_CUSTOM_COLORS.

colorWaveSelBackground

Color used for rendering the waveform background when selected. See screenshot A above.

This setting is ignored when the nSelectionMode field above is set to a value different from WAVE_SEL_CUSTOM_COLORS.

colorTransparentGlass

Color used for rendering the transparent glass selection. See screenshot B above.

This setting is ignored when the nSelectionMode field above is set to a value different from WAVE_SEL_TRANSPARENT_GLASS.

nTransparentGlassFactor

Transparent factor for rendering the transparent glass selection.

This value can range from 0 (total opacity) to 255 (total transparency) with a default value of 128. Values outside of this range will be automatically capped to the nearest valid value.

This setting is ignored when the nSelectionMode field above is set to a value different from WAVE_SEL_TRANSPARENT_GLASS.

colorVolumeLevelLine

Color used for rendering horizontal lines related to the volume level. See screenshot A above.

You can set this field to -1 in order to hide volume level lines.

colorTimeLine

Color used for rendering vertical lines related to time. See screenshot A above.

You can set this field to -1 in order to hide time lines.

nTransparentGlassType

Type of transparent glass.

Supported values are the following:

Mnemonic constant | Value | Meaning
TRANSP_GLASS_TYPE_FLAT | 0 | Flat glass.
TRANSP_GLASS_TYPE_3D_VERT (default) | 1 | 3D vertical glass.
TRANSP_GLASS_TYPE_3D_HORZ | 2 | 3D horizontal glass.

This setting is ignored when the nSelectionMode field above is set to a value different from WAVE_SEL_TRANSPARENT_GLASS.

On the screenshot below you can appreciate the difference between the available settings:

nTransparentGlassPos3D

Position of the 3D effect for the transparent glass.

This value can range from 0 to 100 with a default value of 50. Values outside of this range will be automatically capped to the nearest valid value.

This setting is ignored when the nSelectionMode field above is set to a value different from WAVE_SEL_TRANSPARENT_GLASS.

bTransparentGlassInvert3D

Boolean value that specifies if the transparency of the 3D effect is inverted.

Supported values are the following:

Mnemonic constant | Meaning
False (default) | Doesn't invert 3D effect
True | Inverts 3D effect

This setting is ignored when the nSelectionMode field above is set to a value different from WAVE_SEL_TRANSPARENT_GLASS.

On the screenshot below you can appreciate the difference between the available settings (inverted 3D effect on the left):

bDrawLinesOverWave

Boolean value that specifies if time and volume lines must be drawn over the waveform.

Supported values are the following:

Mnemonic constant | Meaning
False (default) | Time and volume lines are drawn under the waveform.
True | Time and volume lines are drawn over the waveform.


Appendix A - Encodings for audio formats supported natively

Appendix A - Encodings for audio formats supported natively

Full list of encodings available for the audio formats supported natively:

Audio format | Supported encodings
Microsoft WAV | Unsigned 8 bit PCM Signed 16 bit PCM Signed 24 bit PCM Signed 32 bit PCM 32 bit float 64 bit double u-law encoding A-law encoding IMA ADPCM MS ADPCM GSM 6.10 G721 ADPCM 32kbps
SGI / Apple AIFF / AIFC | Unsigned 8 bit PCM Signed 8 bit PCM Signed 16 bit PCM Signed 24 bit PCM Signed 32 bit PCM 32 bit float 64 bit double u-law encoding A-law encoding GSM 6.10
Sun / DEC / NeXT AU / SND | Signed 8 bit PCM Signed 16 bit PCM Signed 24 bit PCM Signed 32 bit PCM 32 bit float 64 bit double u-law encoding A-law encoding G721 ADPCM 32kbps G723 ADPCM 24kbps G723 ADPCM 40kbps
Header-less RAW | Unsigned 8 bit PCM Signed 8 bit PCM Signed 16 bit PCM Signed 24 bit PCM Signed 32 bit PCM 32 bit float 64 bit double u-law encoding A-law encoding GSM 6.10 12 bit DWVW 16 bit DWVW 24 bit DWVW Ok Dialogic ADPCM
Paris Audio File - PAF | Signed 8 bit PCM Signed 16 bit PCM Signed 24 bit PCM
Commodore Amiga IFF / SVX | Signed 8 bit PCM Signed 16 bit PCM
Sphere Nist WAV | Signed 8 bit PCM Signed 16 bit PCM Signed 24 bit PCM Signed 32 bit PCM u-law encoding A-law encoding
IRCAM SF | Signed 16 bit PCM Signed 24 bit PCM Signed 32 bit PCM 32 bit float u-law encoding A-law encoding
Creative VOC | Unsigned 8 bit PCM Signed 16 bit PCM u-law encoding A-law encoding
Soundforge W64 | Unsigned 8 bit PCM Signed 16 bit PCM Signed 24 bit PCM Signed 32 bit PCM 32 bit float 64 bit double u-law encoding A-law encoding IMA ADPCM MS ADPCM GSM 6.10
GNU Octave 2.0 MAT4 | Signed 16 bit PCM Signed 32 bit PCM 32 bit float 64 bit double
GNU Octave 2.1 MAT5 | Unsigned 8 bit PCM Signed 16 bit PCM Signed 32 bit PCM 32 bit float 64 bit double
Portable Voice Format - PVF | Signed 8 bit PCM Signed 16 bit PCM Signed 32 bit PCM
Fasttracker 2 XI | 8 bit DPCM 16 bit DPCM
HMM Tool Kit - HTK | Signed 16 bit PCM
Apple CAF | Signed 8 bit PCM Signed 16 bit PCM Signed 24 bit PCM Signed 32 bit PCM 32 bit float 64 bit double u-law encoding A-law encoding
Sound Designer II - SD2 | Signed 8 bit PCM Signed 16 bit PCM Signed 24 bit PCM
Free Lossless Audio Codec - FLAC | Signed 8 bit PCM Signed 16 bit PCM Signed 24 bit PCM
OGG/Vorbis |