Copyright © 2006-2016 MultiMedia Soft

How to use Mnemonic Constants

Previous pageReturn to chapter overviewNext page

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

enumErrorCodes

LastError property

enumRecorderStatus

Status property

enumVuBandsMode

VUMeter.BandType property

enumOscillType

Oscilloscope.Type property

enumWaveformRes

Waveform.Resolution property

enumCdActions

nAction parameter of the PerformActionOnCd method

enumCdStates

return value of GetCdStatus method and nCdStatus parameter of the CdPlayerStatusChanged event

enumCdIdCodes

nIdentType parameter of the GetCdIdentification method

enumCddbAlbumInfo

nInfo parameter of the CddbGetAlbumInfo method

enumCdCoverSizes

nCoverSize parameter of the GetCdCoverPictureURL, GetCdCoverPictureFile methods and of the CdCoverPictureFileAvailable event

enumEncodingFormats

EncodeFormats.ForRecording, EncodeFormats.ForCdRipping and EncodeFormats.ForExporting properties

enumResampleModes

EncodeFormats.ResampleMode property

enumWavEncodeModes

EncodeFormats.WAV.EncodeMode property

enumWmaEncodeModes

EncodFormats.WMA.EncodeMode property and nEncodeMode parameter of the EncodeFormats.WMA.GetEncodingProfileInfo method.

enumMp2EncodeModes

EncodeFormats.MP2.EncodeMode property

enumMp3EncodeModes

EncodeFormats.MP3.EncodeMode property

enumMp3EncodePresets

EncodeFormats.MP3.Preset property

enumOggEncodeModes

EncodeFormats.OGG.EncodeMode property

enumAacEncodeModes

EncodeFormats.AAC.EncodeMode property

enumAcmEncodeModes

EncodeFormats.ACM.EncodeMode property

enumW64EncodeModes

EncodeFormats.W64.EncodeMode property

enumAIFFEncodeModes

EncodeFormats.AIFF.EncodeMode property

enumAUEncodeModes

EncodeFormats.AU.EncodeMode property

enumPAFEncodeModes

EncodeFormats.PAF.EncodeMode property

enumSVXEncodeModes

EncodeFormats.PAF.EncodeMode property

enumNISTEncodeModes

EncodeFormats.NIST.EncodeMode property

enumVOCEncodeModes

EncodeFormats.VOC.EncodeMode property

enumIRCAMEncodeModes

EncodeFormats.IRCAM.EncodeMode property

enumPVFEncodeModes

EncodeFormats.PVF.EncodeMode property

enumCAFEncodeModes

EncodeFormats.CAF.EncodeMode property

enumFLACEncodeModes

EncodeFormats.FLAC.EncodeMode property

enumRAWEncodeModes

EncodeFormats.RAW.EncodeMode property and nEncodeMode parameter of the StartFromFileRaw, StartFromMemoryRaw and StartFromQueueRaw methods

enumRecordingModes

nMode parameter of the SetRecordingMode method

enumScaleUnits

nScaleUnits parameter of the RecordedSound.SeekPlayPosition and CdRippingSetRange methods

enumWaveformTypes

nWaveformType parameter of the WaveformAnalyzer.GetMinMaxPeakLevelsForRange method

enumSoundEditCommands

nCommand parameter of the SoundEditStarted and SoundEditDone events

enumTrackerCursorModes

nCursorMode parameter of the WaveformAnalyzer.SetTrackerCursors method

enumGraphicBarOrientations

nOrientation member of the GRAPHIC_BAR_SETTINGS data structure

enumGraphicBarShapes

nShape member of the GRAPHIC_BAR_SETTINGS data structure

enumAnalyzerResolutions

nResolution field of the WANALYZER_GENERAL_SETTINGS data structure

enumWaveformStereoModes

nStereoVisualizationMode field of the WANALYZER_WAVEFORM_SETTINGS and WSCROLLER_SETTINGS data structures

enumMouseActions

nAction parameter of the WaveAnalyzerMouseNotification event

enumBitmapModes

nWaveformType parameter of the WaveformAnalyzer.SetBackPictureFromFile and WaveformAnalyzer.SetBackPictureFromHandle methods

enumVolumeScales

nScaleType parameter of the ASIO.DeviceChannelVolumeGet, ASIO.DeviceChannelVolumeSet, ASIO.DeviceMasterVolumeGet and ASIO.DeviceMasterVolumeSet, OutputVolumeSet and OutputVolumeGet methods and nAmplitudeScale field of the WANALYZER_RULERS_SETTINGS data structure

enumAsioChannelModes

nChannelMode parameter of the ASIO.DeviceStart method

enumDriverTypes

nDriverType parameter of the InitDriversType method and return value of the GetInputDeviceDriverType method

enumWaveAnalyzerRectangles

nIdRectangle parameter of the WaveformAnalyzer.GetRectangle method

enumInputChannelTypes

Return value of the GetInputDeviceChannelType method

enumGraphicFormats

nFormat parameter of the WaveformAnalyzer.SnapshotViewSaveToFile method

enumCommonDialogInfo

nInfo parameter of the CommonDialogGetInfoFromLastOpen and CommonDialogGetInfoFromLastSave methods.

enumVolumeScales

nScaleType parameter of the OutputVolumeSet and OutputVolumeGet methods.

enumPlaybackStatus

Return value of the GetPlaybackStatus method

enumCoreAudioDeviceStates

nStateMask parameter of the CoreAudioDevices.Enum method

enumCoreAudioDataFlows

nDataFlow parameter of most methods of the CoreAudioDevices COM object

enumCoreAudioDeviceNames

nTypeOfName parameter of the CoreAudioDevices.DescGet method

enumCoreAudioRoles

nRole parameter of the CoreAudioDevices.DefaultGet method

enumCoreAudioDeviceStates

nStatus parameter of the CoreAudioDevices.StatusGet method

enumCoreAudioCaptureParts

nPartId parameter of the CoreAudioDevices.CapturePartChannelCountGet, CoreAudioDevices.CapturePartChannelVolumeGet and CoreAudioDevices.CapturePartChannelVolumeSet methods

enumCoreAudioRenderParts

nPartId parameter of the CoreAudioDevices.RenderPartChannelCountGet, CoreAudioDevices.RenderPartChannelVolumeGet. CoreAudioDevices.RenderPartChannelVolumeSet, CoreAudioDevices.RenderPartMuteGet and CoreAudioDevices.RenderPartMuteSet methods

enumWasapiDeviceTypes

nDeviceType parameter of the WASAPI.DeviceCoreAudioIndexGet, WASAPI.DeviceGetCount, WASAPI.DeviceGetDesc, WASAPI.DeviceIsFormatSupported, WASAPI.DeviceIsStarted, WASAPI.DeviceLatencyGet, WASAPI.DeviceMuteGet, WASAPI.DeviceMuteSet, WASAPI.DeviceSharedFormatGet, WASAPI.DeviceStartExcusive, WASAPI.DeviceStartShared, WASAPI.DeviceStop, WASAPI.DeviceVolumeGet, WASAPI.DeviceVolumeSet methods

enumWasapiChannelModes

nChannelMode parameter of the WASAPI.DeviceStartShared method

enumCoreAudioDeviceTypes

nDeviceType parameter of the CoreAudioDevices.TypeGet method

enumHorizontalLineHeadlineType

nHeadlineType parameter of the WaveformAnalyzer.GraphicItemHorizontalLineAdd and WaveformAnalyzer.GraphicItemHorizontalLineParamsSet methods

enumHorizontalLineChannel

nChannel parameter of the WaveformAnalyzer.GraphicItemHorizontalLineAdd, WaveformAnalyzer.GraphicItemHorizontalLineParamsSet methods and nChannel field of the WANALYZER_HORIZONTAL_LINE data structure

enumGraphicItemType

nType parameter of the WaveformAnalyzer.GraphicItemTypeGet, WaveformAnalyzer.GraphicItemsTypeShow and WaveformAnalyzer.GraphicItemUniqueIdGet methods

enumGraphicItemMaskValues

nGraphicItemsMask parameter of the WaveformAnalyzer.GraphicItemsMouseMoveEnable and WaveformAnalyzer.SnapshotViewGraphicItemsMaskSet 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

enumAsioRecordMonoToStereoMode

nMonoChanToStereoOutMode parameter of the ASIO.DeviceRecordParamsGet and ASIO.DeviceRecordParamsSet methods

enumSoundActivationSystemModes

nMode parameter of the SoundActivationSystemSet method

enumWaveSnapshotViewMode

nMode parameter of the WaveformAnalyzer.SnapshotViewSaveToFile, WaveformAnalyzer.SnapshotViewSaveToMemory , and WaveformAnalyzer.SnapshotViewDrawToHdc methods

enumWaveformChannels

nChannel parameter of the WaveformAnalyzer.SnapshotViewSaveToFile, WaveformAnalyzer.SnapshotViewSaveToMemory , and WaveformAnalyzer.SnapshotViewDrawToHdc methods

enumWaveAnalyzerViewModes

nMode parameter of the WaveformAnalyzer.ViewModeSet and WaveformAnalyzer.ViewModeGet methods

enumFilterNames

nFilterName parameter of the FilterApply, FilterParametersSet, FilterParametersGet and RecordedSound.FilterApply methods

enumFilterTypes

nFilterType parameter of the FilterApply, FilterParametersSet, FilterParametersGet and RecordedSound.FilterApply methods

enumZipEncryptionTypes

nEncryptionType parameter of the ZIP.Create method

 

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 AdjMmsEngDef.h in order to use predefined Mnemonic Constants: This module can be found inside the product Include directory (default C:\Program Files\Active Sound Recorder\include).

 

You can test in the recorder is currently ripping a CD track using the following line of code:

 

if (AudioSoundRecorder1.GetStatus () == RECORD_STATUS_CD_RIPPING)

 // do something

 .....

else

 // do something else

 .....

 

 

The GetStatus method is defined by the control wrapper class CActiveSoundRecorder contained inside the ActiveSoundRecorder.cpp and ActiveSoundRecorder.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 "ActiveSoundRecorder.h"

 

The mnemonic constant RECORD_STATUS_CD_RIPPING can be found inside the AdjMmsEngDef.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 "AdjMmsEngDef.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 AudioSoundRecorder1.Status

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

asrec_i000062

 

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

If ActiveSoundRecorder1.Status = RECORD_STATUS_CD_RIPPING Then

 ' do something

 .....

Else

 ' do something else

 .....

End If