Copyright © 2006-2018 MultiMedia Soft

OutputDeviceSet method

Previous pageReturn to chapter overviewNext page



Changes the output device (sound card) used for playback. This method can be called at any time, also during playback. The current selected device can be obtained through the OutputDeviceGet method.

Use the value returned by the OutputDeviceGetCount method in order to know how many output devices are currently installed on the system and the OutputDeviceGetDesc method in order to retrieve the friendly name of every output device.





[Visual Basic]

Public Function OutputDeviceSet (

nOutputIndex as Int16

) as enumErrorCodes



public enumErrorCodes OutputDeviceSet (

Int16 nOutputIndex




public: enumErrorCodes OutputDeviceSet (

Int16 nOutputIndex









Number representing the index of the output device that will be used by the given player. The value of this parameter can be in the range between 0 and the value returned by the OutputDeviceGetCount method.



Return value






Negative value

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

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.