Copyright © 2001-2018 MultiMedia Soft

StreamMixerCreateWithSurround method

Previous pageReturn to chapter overviewNext page

Remarks

 

Creates a new custom stream mixer object with multi-channel surround support that will send the mixed stream to a given output device.

Stream mixers with surround support cannot be used as a source for casting sessions: for these purposes, always use the StreamMixerCreate method.

 

Custom stream mixers cannot be created when the InitDriversType method has been called with the nDriverType parameter set to a value different from DRIVER_TYPE_DIRECT_SOUND.

 

Further information about the use of custom Stream Mixers can be found inside the How to use custom Stream Mixers tutorial.

 

 

Syntax

 

[Visual Basic]

control.StreamMixerCreateWithSurround (

nOutput as Integer,

nFrequency as Long,

nChannels as Integer

) as Long


 

[C++]

long control.StreamMixerCreateWithSurround (

short nOutput,

long nFrequency,

short nChannels

);


 

 

Parameter

Description

 

 

nOutput

Number representing the zero-based index of the output device. The number and descriptions of available output devices can be obtained with a prior call to the GetOutputDevicesCount and GetOutputDeviceDesc

In case you should simply need sending the output of the stream mixer to a streaming server, without the need to hear what is being played, and you shouldn't need to record PCM in output from the stream mixer using the Active Sound Recorder control, the presence of an output device wouldn't be needed so you could set this parameter to -1.

In this specific case the playback stream is not created in "playback mode" but in another mode called "decode mode", in this situation, where the sound card driver is not involved, no synchronization is available between the decoder and what is being passed to the encoder: the encoder always requests to the player to pass as much data as possible so you will certainly observe the stream being "played" (but it would be better to say "consumed") at a higher speed: client PCs connected to the same network stream will obviously play at normal speed.

nFrequency

Sample rate expressed in samples per second

nChannels

Number of output channels: can be a value from 1 to 8

 

 

 

Return value

 

Value

Meaning

 

 

> 0

Numeric value representing the unique identifier of the stream mixer: this unique identifier will be used in order to invoke further methods related to the use of the stream mixer itself

Negative value

An error occurred: see the LastError property for further error details or for a list of the possible error values.