Copyright © 2006 - 2008 MultiMedia Soft 
Return to Table of contents  
 
 
How to use Mnemonic Constant
 
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
enumOscillType
enumWaveformRes
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
enumResampleModes
enumWavEncodeModes
enumWmaEncodeModes
enumMp3EncodeModes
enumMp3EncodePresets
enumOggEncodeModes
enumAacEncodeModes
enumAcmEncodeModes
enumW64EncodeModes
enumAIFFEncodeModes
enumAUEncodeModes
enumPAFEncodeModes
enumSVXEncodeModes
enumNISTEncodeModes
enumVOCEncodeModes
enumIRCAMEncodeModes
enumPVFEncodeModes
enumCAFEncodeModes
enumFLACEncodeModes
enumRAWEncodeModes
EncodeFormats.RAW.EncodeMode property and nEncodeMode parameter of the StartFromFileRaw and StartFromMemoryRaw methods
enumRecordingModes
nMode parameter of the SetRecordingMode method
enumScaleUnits
nScaleUnits parameter of the RecordedSound.SeekPlayPosition and CdRippingSetRange methods
enumWaveformTypes
nWaveformType parameter of the WaveformAnalyzer.CreateFileBitmapView 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 member of the WAVEFORM_ANALYZER_SETTINGS data structure
enumWaveformStereoModes
nStereoVisualizationMode member of the WAVEFORM_ANALYZER_SETTINGS data structure
enumWaveformLineModes
nWavePositionLineType and nWavePlaybackLineType members of the WAVEFORM_ANALYZER_SETTINGS data structure and nMode parameter of the WaveformAnalyzer.VerticalLineAdd method
enumMouseActions
nAction parameter of the WaveAnalyzerMouseAction event
enumBitmapModes
enumVolumeScales
nScaleType parameter of the SetMixingParams 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 actually 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 actually 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: 
     
     
    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 
     
     
     
     
     
     
     
     
    Copyright © 2006 - 2008 MultiMedia Soft 
    Return to Table of contents