Copyright © 2005-2018 MultiMedia Soft

CastingWmaNetworkOpenFromWasapiLoopback method

Previous pageReturn to chapter overviewNext page

Remarks

 

Creates a network session in WMA format to a certain port of the network for the output of the given loopback device.

The usage of this method allows sending on the WMA network session any sound being played through an audio endpoint device by any application running inside the system.

 

After creating the casting session, you can start it through the CastingStart method.

 

This method is only intended for usage with Windows Vista and later versions.

 

Further information about management of casting sessions can be found inside the How to use the control as a source for streaming servers like SHOUTcast tutorial.

For further details about the use of WASAPI see the WASAPIMan class and the How to manage audio flow through WASAPI tutorial

 

 

Syntax

 

[Visual Basic]

Public Function CastingWmaNetworkOpenFromWasapiLoopback (

nDeviceIndex as Int16,

strOutputPort as String

nMaxClients as Int32

nBitrate as Int32

) as Int32


 

[C#]

public Int32 CastingWmaNetworkOpenFromWasapiLoopback (

Int16 nDeviceIndex,

string strOutputPort,

Int32 nMaxClients,

Int32 nBitrate

);


 

[C++]

public: Int32 CastingWmaNetworkOpenFromWasapiLoopback (

Int16 nDeviceIndex,

string strOutputPort,

Int32 nMaxClients,

Int32 nBitrate

);


 

 

Parameter

Description

 

 

nDeviceIndex

Number representing the zero-based index of the WASAPI loopback device of interest. The total number of available WASAPI devices can be obtained using the WASAPI.DeviceGetCount method having the nDeviceType parameter set to WASAPI_DEVICE_TYPE_LOOPBACK.

strOutputPort

String representing the number representing the network output port

nMaxClients

Maximum number of accepted clients

nBitrate

Bitrate expressed in bits per seconds

 

 

 

Return value

 

Value

Meaning

 

 

> 0

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

Negative value

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