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 and nFormat parameter of the LoadInternetStreamWithFormat method |
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 PlayListCreatEx 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 StreamVolumeLevelGet, StreamVolumeLevelSet, 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 |
Effects.DirectXEffectApply, Effects.DirectXEffectIsApplied, Effects.DirectXEffectParamsSet and Effects.DirectXEffectParamsGet 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, PreAmplifierSetSpeakerValue, TracksBoard.ItemSpeakerGet and TracksBoard.ItemSpeakerSet methods, return value of the StreamOutputSpeakerGet and method |
enumCddbAlbumInfo |
nInfo parameter of the CddbGetAlbumInfo method |
enumCdCoverSizes |
nCoverSize parameter of the GetCdCoverPictureURL, GetCdCoverPictureFile and CdCoverPictureFileGet 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 Effects.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, LoadSoundFromRawMemory, MediaFileDecoder.FileInfoGet, MediaFileDecoder.FileOpenRaw, SoundComposer.ItemSoundFileRawAdd, SoundComposer.ItemSoundFileMemoryRawAdd, SoundComposer.ItemSoundFileRawInfoGet 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, VolumeAutomation.CurveDesigner.DisplayCurveType, StreamVolumeSlide, StreamVolumeSlideEx, StreamVolumeSmoothingSet, StreamVolumeSmoothingSetEx, TracksBoard.ItemVolumeFadingGet, TracksBoard.ItemVolumeFadingSet, TracksBoard.ItemVolumeFadingSetEx, TracksBoard.ItemVolumePointCurveGet, TracksBoard.ItemVolumePointCurveSet and TracksBoard.ItemVolumePointCurveSetEx 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 |
enumCdInfo |
nInfo parameter of the CdInfoGet method |
enumMidiPositionUnits |
nPositionUnit parameter of the MIDI.SeekToPosition, MIDI:MarkersEnumItemGet, MIDI.StreamEventsEnumFromRange, MIDI.StreamEventsEnumItemGet, MIDI.TriggerAdd, MIDI.TriggerSetPos methods. |
enumMidiMarkerNotifications |
nMarkerType parameter of the MidiMarkerNotification event and of the MIDI.MarkersEnableNotifications, MIDI.MarkersEnum and MIDI:MarkersEnumItemGet methods. |
enumMidiStreamEvents |
nMidiEvent parameter of the MidiStreamEventNotification event and of the MIDI.StreamEventApply, MIDI:StreamEventValueGet, MIDI.StreamEventsEnableNotifications, MIDI.StreamEventsEnum, MIDI.StreamEventsEnumFromRange, MIDI:StreamEventsEnumItemGet, MIDI.StreamEventsListItemAdd, MIDI.StreamEventsListItemModify, MIDI.StreamEventsListItemGet methods. |
enumMidiKeyboardOrientations |
nOrientation parameter of the MIDI.KeyboardCreate method |
enumMidiSoundFontStringInfo |
nInfo parameter of the MIDI.SoundFontInfoStringGet method |
enumMidiSoundFontNumInfo |
nInfo parameter of the MIDI.SoundFontInfoNumGet method |
enumVstType |
nType parameter of the VST.GetType method |
enumWasapiDeviceTypes |
nDeviceType parameter of the WASAPI.InputDeviceAttachToPlayer, 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, SoundRecognizer.StartOnWasapiDevice methods |
enumWasapiChannelModes |
nChannelMode parameter of the WASAPI.DeviceStartShared method |
enumCoreAudioDeviceTypes |
nDeviceType parameter of the CoreAudioDevices.TypeGet method |
enumOSDAutoMoveDirection |
nDirection parameter of the VideoMixer.OSDItemMovementSet method |
enumWaveformStereoModes |
nStereoVisualizationMode parameter of the WSCROLLER_SETTINGS structure |
enumWaveScrollerAutoUpdate |
nUpdateSpeed parameter of the WSCROLLER_SETTINGS structure |
enumBitmapModes |
nMode parameter of the WaveformScroller.SetBackPictureFromFile and WaveformScroller.SetBackPictureFromHandle methods |
enumVideoImageAdjustProps |
nProperty parameter of the VideoPlayer.ImageAdjustPropertyGet, VideoPlayer.ImageAdjustPropertySet and VideoPlayer.ImageAdjustPropertyRangeGet methods |
enumGraphicItemMaskValues |
nGraphicItemsMask field of the WSCROLLER_SETTINGS data structure |
enumWaveformLineDashStyles |
nPositionLineDashStyle field of the WSCROLLER_SETTINGS data structure |
enumLineCaps |
nPositionLineHighCap and nPositionLineLowCap fields of the WSCROLLER_SETTINGS data structure |
enumLineDashCaps |
nPositionLineDashCap field of the WSCROLLER_SETTINGS data structure |
enumBassModules |
nModule parameter of the BassModuleGet method |
enumBassPluginStreamCreateFuncs |
nType parameter of the BassPluginStreamCreateFunc method |
enumComponentTypes |
nComponentType parameter of the MixerVolumeSet, MixerVolumeGet, MixerMuteSet and MixerMuteGet methods |
enumInternetSetting |
nSetting parameter of the InternetSettingsGet and InternetSettingsSet methods |
enumMediaTypes |
nMediaType parameter of the Downloader.SessionStartToPlayer and Youtube.VideoSearchByIDDownloadStreamToPlayer methods |
enumDataTypes |
nDataType parameter of the MediaFileDecoder.FileDataGet method |
enumDecodePositionUnit |
nPositionUnit parameter of the MediaFileDecoder.FilePositionGet and MediaFileDecoder.FilePositionSet methods |
enumPlayerEvents |
nEvent parameter of the CallbackForPlayersEventsSet method |
enumCdDrivesEvents |
nEvent parameter of the CallbackForCdDrivesEventsSet method |
enumCoreAudioEvents |
nEvent parameter of the CallbackForCoreAudioEventsSet method |
enumSapiVoiceAttributes |
nAttribute parameter of the SoundGenerator.SpeechVoiceAttributeGet method |
enumSoundGenWaveTypes |
nWaveType parameter of the SoundGenerator.StreamCreateTone, SoundGenerator.StreamChannelAddTone and SoundGenerator.StreamElementToneTypeGet methods |
enumSoundGenNoiseTypes |
nNoiseType parameter of the SoundGenerator.StreamCreateNoise, SoundGenerator.StreamChannelAddNoise and SoundGenerator.StreamElementToneNoiseGet methods |
enumSoundGenSlidingWaveTypes |
nWaveType parameter of the SoundGenerator.StreamCreateSlidingTone, SoundGenerator.StreamChannelAddSlidingTone and SoundGenerator.StreamElementSlidingToneTypeGet methods |
enumSoundGeneratorTypes |
nType parameter of the SoundGenerator.StreamElementTypeGet method |
enumSpectrumEnhTypes |
nGraphType field of the SPECTR_ENH_GENERAL_SETTINGS data structure |
enumSpectrumEnhWindowTypes |
nFFTWindowType field of the SPECTR_ENH_GENERAL_SETTINGS data structure |
enumZipEncryptionTypes |
nEncryptionType parameter of the ZIP.Create method |
enumPlayerSoundComposerTypes |
nType parameter of the SoundComposer.ItemTypeGet method |
enumRecognizeSoundInfo |
nInfo parameter of the SoundRecognizer.ResultInfoGet method |
enumRecognizeSoundArtistInfo |
nInfo parameter of the SoundRecognizer.ResultArtistInfoGet method |
enumSoundRecognizerEvents |
nEvent parameter of the CallbackForSoundRecognizerEvents delegate |
enumAacPlusEncodeModes |
EncodeFormats.AACPlus.EncodeMode property |
enumTracksBoardRectangles |
nIdRectangle parameter of the TracksBoard.RectangleGet method and nRectangle parameter of the TracksBoard.MouseActionRectangleGet method |
enumTracksBoardViewModes |
nViewMode field of the TRACKSBOARD_WAVEFORM_SETTINGS data structure |
enumTracksBoardItemTypes |
nType parameter of the TracksBoard.ItemTypeGet method |
enumTracksBoardTitleModes |
nShowTitleText field of the TRACKSBOARD_ITEM_SETTINGS data structure |
enumMouseActions |
nAction parameter of the TracksBoardMouseNotification and WaveScrollerMouseNotification events and of the CallbackTracksboardMouseNotif and CallbackWaveformScrollerMouseNotif delegates |
enumEncodingFormats |
EncodeFormats.FormatToUse property |
enumAacEncodeModes |
EncodeFormats.AAC.EncodeMode property |
enumAacPlusEncodeModes |
EncodeFormats.AACPlus.EncodeMode property |
enumMp3EncodeModes |
EncodeFormats.MP3.EncodeMode property |
enumWavEncodeModes |
EncodeFormats.WAV.EncodeMode property |
enumOggEncodeModes |
EncodeFormats.OGG.EncodeMode property |
enumWmaEncodeModes |
EncodeFormats.WMA.EncodeMode property and nEncodeMode parameter of the EncodeFormats.WMA.GetEncodingProfileInfo, EncodeFormats.WMA.GetEncodingCBRCount, EncodeFormats.WMA.GetEncodingCBR, EncodeFormats.WMA.GetEncodingProfileProCount and EncodeFormats.WMA.GetEncodingProfileProInfo methods. |
enumW64EncodeModes |
EncodeFormats.W64.EncodeMode property |
enumFLACEncodeModes |
EncodeFormats.FLAC.EncodeMode property |
enumYoutubeChannelsSearchInfo |
nInfo parameter of the Youtube.ChannelsListSearchItemInfoGet method |
enumYoutubeChannelItemsSearchInfo |
nInfo parameter of the Youtube.ChannelVideoListSearchItemInfoGet method |
enumYoutubeVideosSearchInfo |
nInfo parameter of the Youtube.VideoListSearchItemInfoGet method |
enumYoutubeStreamType |
nType parameter of the Youtube.VideoSearchByIDDownloadStreamToFile, Youtube.VideoSearchByIDDownloadStreamToPlayer, Youtube.VideoSearchByIDStreamCountGet and Youtube.VideoSearchByIDStreamInfoGet methods |
enumYoutubeStreamInfo |
nInfo parameter of the Youtube.VideoSearchByIDStreamInfoGet method |
enumYoutubeVideoSearchByIdInfo |
nInfo parameter of the Youtube.VideoSearchByIDInfoGet and nThumbSize parameter of the Youtube.VideoSearchByIDThumbnailGet methods |
enumYoutubeSearches |
nSearchType parameter of the YoutubeSearchDone event and nData1 parameter of the CallbackForYoutubeEvents delegate |
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
....