Copyright © 2001-2019 MultiMedia Soft

LoadSoundSync method

Previous pageReturn to chapter overviewNext page

Remarks

 

Loads a song from the specified file through a secondary thread: as you may know, the only way to know the exact song's duration for MP3 files is scanning the file completely and, for very long files, the use of the LoadSound method could be quite lengthy and could temporarily freeze the user interface of the container application. This method avoids any user interface blocking and, once completed, a SoundSyncLoaded event will be fired.

 

Accepted audio formats are the same as seen inside the LoadSound method.

 

 

Syntax

 

[Visual Basic]

control.LoadSoundSync (

nPlayer as Integer,

strFileName as String

) as enumErrorCodes


 

[C++]

short control.LoadSoundSync (

short nPlayer,

LPCTSTR strFileName

);


 

 

Parameter

Description

 

 

nPlayer

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

strFilename

String containing the absolute pathname 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.

 

 

Return value

 

Value

Meaning

 

 

enumErrorCodes.NOERROR (0)

The method call was successful.

Negative value

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