Copyright © 2005-2018 MultiMedia Soft

LoadSoundInMono method

Previous pageReturn to chapter overviewNext page

Remarks

 

Loads a song from the specified file and convert it to Mono: only MP3, MP2 and MP1 formats will be converted from Stereo to Mono while other Stereo formats will fail.

 

A successful call to this method invokes the CallbackForPlayersEvents delegate with the nEvent parameter set to EV_SOUND_LOADED.

 

 

Syntax

 

[Visual Basic]

Public Function LoadSoundInMono (

nPlayerIndex as Int16,

strFileName as String,

bFast as Boolean

) as enumErrorCodes


 

[C#]

public enumErrorCodes LoadSoundInMono (

Int16 nPlayerIndex,

string strFileName,

bool bFast

);


 

[C++]

public: enumErrorCodes LoadSoundInMono (

Int16 nPlayerIndex,

string strFileName,

bool bFast

);


 

 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the player that will load the sound

strFilename

String containing the name of the song file to load. It can be a full path name (ex. c:\mysounds\sound.mp3) or a filename (ex: sound.mp3) if the SoundsDirectory property has already been specified.

bFast

Flag that determines if a less detailed analysis must be performed for files in MP3 format: the use of this method is indicated when you need an immediate loading of MP3 files from a network.

 

 

Return value

 

Value

Meaning

 

 

enumErrorCodes.NOERROR (0)

The song file has been loaded successfully.

Negative value

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

 

(*) Requires Microsoft Windows Media Format modules already installed on the target PC: you can verify the presence of these modules through a call to the IsWmaAvailable method.

(**) Performs sound tracks only (no video): requires Microsoft Windows Media Format modules already installed on the target PC

(***) Performs sound tracks only (no video)

The Windows Media Format modules can be installed using the redistribution setup package (wmfdist.exe) provided by Microsoft. Details about the integration of these modules inside your own setup package can be found on the following link of the official Microsoft web site (note that in the future this link could change due to the Microsoft site maintenance).