|
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 |
|
enumDriverTypes |
nDriverType parameter of the InitDriversType method |
enumPlayerStatus |
return value of GetPlayerStatus method |
enumScaleUnits |
|
enumFileTypes |
nFileType property of the SoundInfo class |
enumTagId3Versions |
nMP3TagVersion property of the SoundInfo class |
enumTagTypes |
nTagType parameter of the IsTagAvailable and GetTagString methods |
enumTagFields |
nField parameter of the GetFileTagField method |
enumPlayListModes |
nMode parameter of the PlayListLoad and PlayListCreate methods |
enumPlayListFormats |
nFormat parameter of the PlayListSave method |
enumPlayListStrings |
nString parameter of the PlayListGetItemString method |
enumOscillType |
|
enumVuBandsMode |
|
enumWaveformUpdateRes |
|
enumFadeOutModes |
|
enumFadeTypes |
nFadeType parameter of the Fader.Init method |
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 |
enumVolumeScales |
nScaleType parameter of the StreamVolumeGet, StreamVolumeSet, PlayListSaveAutomation, ASIO.DeviceChannelVolumeGet, ASIO.DeviceChannelVolumeSet, ASIO.DeviceMasterVolumeGet, ASIO.DeviceMasterVolumeSet, PlayListItemVolAutomPointAdd, Fader.FadeInTargetVolumeGet, Fader.FadeInTargetVolumeSet, CoreAudioDevices.ChannelVolumeGet, CoreAudioDevices.ChannelVolumeSet, CoreAudioDevices.MasterVolumeGet, CoreAudioDevices.MasterVolumeSet methods. VolumeAutomation.ScaleType property. |
enumDirectXEffects |
SetDirectXEffect, GetDirectXEffect, SetDirectXEffectParams and GetDirectXEffectParams methods |
enumEAXEffects |
SetEAXEffect method |
enumWaveformResolutions |
Waveform.AnalyzeFullSound method |
enumWaveformTypes |
Waveform.BitmapViewSaveToFile and Waveform.BitmapViewSaveToMemory methods |
enumSpeakersConfig |
GetOutputSpeakersConfig and SetOutputSpeakersConfig methods |
enumSpeakers |
nSpeaker parameter of the StreamOutputSpeakerSet, PreAmplifierGetSpeakerValue and PreAmplifierSetSpeakerValue methods, return value of the StreamOutputSpeakerGet and method |
enumCddbAlbumInfo |
nInfo parameter of the CddbGetAlbumInfo method |
enumCdCoverSizes |
nCoverSize parameter of the GetCdCoverPictureURL, GetCdCoverPictureFile and AmazonStoreCdCoverPictureFileGet methods and of the CdCoverPictureFileAvailable event |
enumPlayListItemType |
nItemType parameter of the PlayListAddItemEx method |
enumDspExternalFunctions |
nFunctionType parameter of the CustomDSP.ExternalSetFunction method |
enumVstInfo |
nInfo parameter of the VST.GetInfoString method |
enumVstParamInfo |
nInfo parameter of the VST.ProgramParamGetInfo method |
enumEqualizerPresets |
nPreset parameter of the EqualizerLoadPresets method |
enumGraphicBarOrientations |
nOrientation member of the GRAPHIC_BAR_SETTINGS data structure |
enumGraphicBarShapes |
nShape member of the GRAPHIC_BAR_SETTINGS data structure |
enumSoundDirections |
Return value of the SoundDirectionGet method and nDirection parameter of the SoundDirectionSet method |
enumRAWEncodeModes |
nEncodeMode parameter of the LoadSoundFromRawFile and LoadSoundFromRawMemory methods |
enumLrcFileIdTags |
nTagType parameter of the LrcIdTagGet method |
enumEncodingFormats |
nEncodeFormat parameter of the CastingCreateFromStreamMixer and CastingCreateFromPlayer methods |
enumCastEncodeModes |
nEncodeMode parameter of the CastingCreateFromStreamMixer and CastingCreateFromPlayer methods |
enumAudioRendererModes |
nMode parameter of the VideoPlayer.AudioRendererModeSet method and return value of theVideoPlayer.AudioRendererModeGet method. |
enumMemoryMediaFormats |
nMediaFormat parameter of the VideoPlayer.LoadFromMemory, VideoPlayer.LoadFromMemoryForEAX, VideoPlayer.LoadFromMemoryForTempoChange, VideoPlayer.LoadFromMemorySync, VideoPlayer.LoadFromMemorySyncForEAX and VideoPlayer.LoadFromMemorySyncForTempoChange methods. |
enumTextAlignment |
nAlignment parameter of the VideoMixer.OSDItemTextAdd and VideoMixer.OSDItemTextChange methods |
enumRectAlignment |
nAlignment parameter of the VideoMixer.OSDItemChangeAlignment method |
enumDriverTypes |
nDriverType parameter of the InitDriversType method and return value of the GetOutputDeviceDriverType method |
enumAsioChannelModes |
nChannelMode parameter of the ASIO.DeviceStart method |
enumVolumeAutomationPosUnits |
nPosUnit parameter of the PlayListSaveAutomation method, nPositionUnit parameter of the PlayListItemVolAutomPointAdd and PlayListItemCuePointAdd methods. VolumeAutomation.PositionUnit property. |
enumVolumeCurves |
nCurveType parameter of the PlayListItemVolAutomPointAdd, VolumeAutomation.PointAdd, VolumeAutomation.PointGetParams, VolumeAutomation.PointSetParams, VolumeAutomation.PointAdd and VolumeAutomation.CurveDesigner.DisplayCurveType methods. |
enumWavChunkStringInfo |
nInfoField parameter of the GetWavChunkStringInfo method |
enumWavChunkNumericInfo |
nInfoField parameter of the GetWavChunkNumericInfo method |
enumWavChunkBinaryInfo |
nInfoField parameter of the GetWavChunkBinaryInfo method |
enumFilterNames |
nFilterName parameter of the FilterApply method |
enumFilterTypes |
nFilterType parameter of the FilterApply method |
enumGraphicFormats |
nFormat parameter of the Waveform.BitmapViewSaveToFile and VideoPlayer.FrameGrabberExecToFile methods |
enumWaveformStereoModes |
nWaveformStereoMode parameter of the Waveform.BitmapViewDrawToHdc method |
enumWaveformLineModes |
nMode parameter of the Waveform.BitmapViewVerticalLineAdd method |
enumMp3BitrateTypes |
Return value of the GetMp3BitrateType method |
enumVideoGrabberStopTypes |
nStopType parameter of the VideoPlayer.FrameGrabberExecToFile and VideoPlayer.FrameGrabberExecToMemory methods |
enumFramesSet |
Return value of the VideoPlayer.FrameGrabberResultsGetAvailableType method |
enumTagAvailable |
Return value of TagsReader.ALL_AnalyzeSoundOnPlayer and TagsReader.ALL_AnalyzeSoundFile methods |
enumTagFields |
nField parameter of the TagsReader.ALL_CommonFrameGet, TagsReader.ID3V1_FieldGet, TagsReader.APE_TextFieldGet, TagsReader.LYRICS3_TextFieldGet methods |
enumMp4Frames |
nFrameId parameter of the TagsReader.MP4_TextFrameGet method |
enumOggFrames |
nFrameId parameter of the TagsReader.OGG_TextFrameGet method |
enumId3v2FrameInfo |
nInfo parameter of the TagsReader.ID3V2_PictureFrameInfoGet, TagsReader.ID3V2_CommentFrameInfoGet, TagsReader.ID3V2_SynchLyricsFrameInfoGet, TagsReader.ID3V2_GeneralObjectFrameInfoGet, TagsReader.ID3V2_UnsynchLyricsFrameInfoGet, TagsReader.FLAC_PictureFrameInfoGet, TagsReader.WMA_PictureFrameInfoGet methods |
enumId3v2PictureType |
nPictureType parameter of the TagsReader.ID3V2_PictureFrameTypeGet, TagsReader.WMA_PictureFrameTypeGet, TagsReader.FLAC_PictureFrameTypeGet methods |
enumId3v2ReceivedAsType |
nReceivedAs parameter of the TagsReader.ID3V2_CommercialFrameReceivedAsGet method |
enumId3v2CommercialInfo |
nInfo parameter of the TagsReader.ID3V2_CommercialFrameInfoGet method |
enumId3v2SyncLyricsType |
nLyricsType parameter of the TagsReader.ID3V2_SynchLyricsFrameInfoNumGet method |
enumId3v2TimeStampFormats |
nTimeStampFormat parameter of the TagsReader.ID3V2_SynchLyricsFrameInfoNumGet, TagsReader.ID3V2_EventTimingsFrameEventCountGet methods |
enumId3v2OwnershipInfo |
nInfo parameter of the TagsReader.ID3V2_OwnershipFrameInfoGet method |
enumId3v2EventTimingTypes |
nEventTimingType parameter of the TagsReader.ID3V2_EventTimingsFrameEventInfoGet method |
enumBextChunkField |
nFieldId parameter of the TagsReader.WAV_BextChunkTextFieldGet method |
enumBextChunkBinaryField |
nFieldId parameter of the TagsReader.WAV_BextChunkBinaryFieldGet method |
enumCartChunkTextField |
nFieldId parameter of the TagsReader.WAV_CartChunkTextFieldGet method |
enumCartChunkTimeMarkerField |
nFieldId parameter of the TagsReader.WAV_CartChunkTimeMarkerFieldGet method |
enumCoreAudioDeviceStates |
nStateMask parameter of the CoreAudio.Enum method |
enumCoreAudioDataFlows |
nDataFlow parameter of most methods of the CoreAudioDevicesMan class |
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 |
enumAmazonStoreInfo |
nInfo parameter of the AmazonStoreCdInfoGet method |
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 AudioDjStudio1, exists on a form. The purpose of this sample code is to check if a certain player is in paused state.
After typing the code...
if (audioDjStudio1.GetPlayerStatus (0)
press the "=" key on your keyboard. IntelliSense displays the listbox of the possible values that can be assigned to the method parameter.

Select the AudioDjStudio.enumPlayerStatus.SOUND_PAUSED value so the complete line of code will be:
If (AudioDjStudio1.GetPlayerStatus(0) = AudioDjStudio.enumPlayerStatus.SOUND_PAUSED) Then
' do something
...
Else
' do something else
...
End If
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 AudioDjStudio;
After typing the code...
if (audioDjStudio1.GetPlayerStatus (0) = enumPlayerStatus
press the "." key on your keyboard. Note that to use Intellisense, you must add enumPlayerStatus after the equal sign in order to trigger the enumPlayerStatus enumerated type. After typing a period, Intellisense is activated.

Select the SOUND_PAUSED value so the complete line of code will be:
if (audioDjStudio1.GetPlayerStatus (0) = enumPlayerStatus.SOUND_PAUSED)
// do something
....
else
// do something else
....