Copyright © 2005-2019 MultiMedia Soft

VideoPlayer.AudioRendererModeGet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Obtains the current rendering mode for the audio stream of the video clip. The rendering mode can be modified through the VideoPlayer.AudioRendererModeSet method.

 

For further details about the use of the embedded video player see the VideoPlayer class section.

For details about video clips rendering refer to the How to play video files through DirectShow tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function AudioRendererModeGet (

nPlayerIndex as Int16

) as enumAudioRendererModes


 

[C#]

public enumAudioRendererModes AudioRendererModeGet (

Int16 nPlayerIndex

);


 

[C++]

public: enumAudioRendererModes AudioRendererModeGet (

Int16 nPlayerIndex

);


 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the player that will use the video player.

 

 

 

Return value

 

Value

Meaning

 

 

Value >= 0

Current rendering mode.

Supported values are the following:

Mnemonic constant

Value

Meaning

AUDIO_RENDERER_MODE_CUSTOM (default)

0

Custom renderer: in this case the audio stream is managed separately respect to the normal filter graph, allowing to apply most of the special effects, output redirection, speakers management, ASIO drivers support and visual feedbacks as seen for regular sound files.

When using this mode you could experience a small but constant latency between the audio stream that could be in advance respect to the video video stream rendering: the VideoPlayer.AudioRendererDelaySet method can be used to fine-tune or eliminate this latency.

AUDIO_RENDERER_MODE_CUSTOM_RESAMPLE_STEREO

1

Identical to the custom renderer, performs a resampling to stereo of eventual multi-channel audio streams like 5.1; in this case, all left channels will be mixed inside a single left channel and all right channels will be mixed inside a single right channel.

AUDIO_RENDERER_MODE_CUSTOM_NO_SURROUND

2

Identical to custom renderer, if the audio stream is a multi-channel one, for example a 5.1, only the front channels will be rendered, discarding rear and other surround channels.

AUDIO_RENDERER_MODE_DS_STANDARD

3

Audio is rendered through the default DirectSound audio renderer.

When using this mode, you can only apply volume change, balance change and output device redirection (no speakers management, visual feedbacks, special effects,  etc. available).

Available DirectSound output devices registered as DirectShow audio renderers can be enumerated through the VideoPlayer.AudioRendererDsDeviceGetCount and VideoPlayer.AudioRendererDsDeviceGetDesc methods; the current output device can be changed/obtained through the VideoPlayer.AudioRendererDsDeviceSet and VideoPlayer.AudioRendererDsDeviceGet methods.

AUDIO_RENDERER_MODE_NULL

4

Useful when you need to render the video stream only, audio is sent to a NullRenderer filter, meaning that no audio will be reproduced and less CPU will be used.

AUDIO_RENDERER_MODE_CUSTOM_2

5

Audio is rendered through the default DirectSound audio renderer.

When using this mode, you have the same features available through the AUDIO_RENDERER_MODE_CUSTOM mode with the following exceptions:

- doesn't support speakers management

- doesn't support ASIO drivers

- cannot be attached to a custom stream mixer

Available DirectSound output devices registered as DirectShow audio renderers can be enumerated through the VideoPlayer.AudioRendererDsDeviceGetCount and VideoPlayer.AudioRendererDsDeviceGetDesc methods; the current output device can be changed/obtained through the VideoPlayer.AudioRendererDsDeviceSet and VideoPlayer.AudioRendererDsDeviceGet methods.

Negative value

An error occurred (see the LastError property for further error details)