Copyright © 2006 - 2008 MultiMedia Soft 
Return to Table of contents  
 
 
How to use enumerated types 
 
The use of enumerated types improves the readability of your code and, thanks to the features offered by Microsoft's Intellisense, will ease the coding phase. 
 
The following is the full list of enumerated types with their associated properties: 
 
Enumerated type
Corresponding properties or parameters
enumErrorCodes
LastError property
enumRecorderStates
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
enumWmaEncodeModes
enumMp3EncodeModes
enumMp3EncodePresets
enumOggEncodeModes
enumAacEncodeModes
enumWavEncodeModes
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 class
enumGraphicBarShapes
nShape member of the GRAPHIC_BAR_SETTINGS class
enumAnalyzerResolutions
nResolution property of the WAVEFORM_ANALYZER_SETTINGS class
enumWaveformStereoModes
nStereoVisualizationMode property of the WAVEFORM_ANALYZER_SETTINGS class
enumWaveformLineModes
nWavePositionLineType and nWavePlaybackLineType properties of the WAVEFORM_ANALYZER_SETTINGS class and nMode parameter of the WaveformAnalyzer.VerticalLineAdd method
enumMouseActions
nAction parameter of the WaveAnalyzerMouseAction event
enumBitmapModes
 
The following examples, under different development environments, show how to use enumerated types in your code. These examples assume that one instance of the control, named AudioSoundRecorder1, exists on a form. The purpose of this sample code is to check if the recorder is actually ripping a CD track. 
  • Microsoft Visual Basic.NET 
  • Microsoft Visual C#.NET 
  •  
     
    Microsoft Visual Basic.NET 
     
    After typing the code 
    If AudioSoundRecorder1.Status  
    press the "=" key on your keyboard. IntelliSense displays the listbox of the possible values that can be assigned to the method parameter.  
     
     
     
    Select the AudioSoundRecorder.enumRecorderStates.RECORD_STATUS_CD_RIPPING value so the complete line of code will be: 
    If AudioSoundRecorder1.Status = AudioSoundRecorder.enumRecorderStates.RECORD_STATUS_CD_RIPPING 
       ' do something 
       ... 
    Else 
       ' do something else 
       ... 
    End If 
     
     
    Microsoft Visual C#.NET 
     
    This environment requires a couple of additional lines of code to make use of Intellisense. First, you must add the components namespace to your code so the following line must be inserted at the beginning of the form management file: 
    using AudioSoundRecorder; 
     
    After typing the code... 
    if (audioSoundRecorder1.Status == enumRecorderStates 
    press the "." key on your keyboard. Note that to use Intellisense, you must add enumRecorderStates after the equal sign in order to trigger the enumRecorderStates enumerated type. After typing a period, Intellisense is activated.    
     
     
     
    Select the RECORD_STATUS_CD_RIPPING value so the complete line of code will be: 
    if (audioSoundRecorder1.Status == enumRecorderStates.RECORD_STATUS_CD_RIPPING) 
         // do something 
         .... 
    else 
         // do something else 
         .... 
     
     
     
     
     
     
     
     
     
     
    Copyright © 2006 - 2008 MultiMedia Soft 
    Return to Table of contents