Remarks
Loads a specific entry (sound file) from the specified ZIP 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 LoadSoundFromZip 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 LoadSoundFromZip method.
For further details about using ZIP management refer to the How to manage ZIP files tutorial.
Syntax
[Visual Basic]
control.LoadSoundSyncFromZip (
nPlayer as Integer,
strZipPathname as String,
strPassword as String,
strEntryName as String,
bFailOnLowMemory as enumBoolean
) as enumErrorCodes
|
|
[C++]
short control.LoadSoundSyncFromZip (
short nPlayer,
LPCTSTR strZipPathname,
LPCTSTR strPassword,
LPCTSTR strEntryName,
short bFailOnLowMemory
);
|
|
Parameter
|
Description
|
|
|
nPlayer
|
Number representing the zero-based index of the player that will load the sound
|
strZipPathname
|
String containing the absolute pathname of the ZIP file to load.
|
strPassword
|
String containing the optional password for accessing the requested entry; leave it empty if not needed.
|
strEntryName
|
String representing the name of the entry to extract and load.
|
bFailOnLowMemory
|
Flag that determines if, for security purposes, loading of the given entry should fail in case there should be no enough memory for storing the unzipped entry.
Supported values are the following:
Mnemonic Value
|
Meaning
|
BOOL_FALSE
|
In case memory shouldn't be enough to contain the unzipped entry, the same would be stored inside a temporary file. The temporary file would be automatically deleted when closing the sound file through the CloseSound method or after loading a new sound file into the given player.
|
BOOL_TRUE
|
In case memory shouldn't be enough to contain the unzipped entry, the method's call would fail.
|
|
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).
|