TracksBoard.Load method |
|
Remarks
Loads a session, saved at an earlier time through the TracksBoard.Save method, from the given input file.
A successful call to this method will fire the SoundLoadingStarted event followed by a number of SoundLoadingPerc events and finally by the SoundLoadingDone event.
The format of the saved file is in plain XML format: in case you should need to create this file manually, the format of the file is similar to the one shown below:
XML |
<?xml version="1.0" ?> <TracksBoardSession Tracks="4" InitialDurationMs="30000" Speakers="6"> <Items> <Item Type="0" Track="1" OffsetMs="0" Speaker="0" VolumeAmplitude="1.000000" StartPositionMs="0" EndPositionMs="120961"> <Pathname>C:\Temp\1\Drums.mp3</Pathname> <FriendlyName>Drums</FriendlyName> <VolumePointFirst Amplitude="1.000000" /> <VolumePointLast Amplitude="1.000000" /> </Item> <Item Type="0" Track="2" OffsetMs="2032" Speaker="0" VolumeAmplitude="1.000000" StartPositionMs="0" EndPositionMs="114272"> <Pathname>C:\Temp\1\Guitar.mp3</Pathname> <FriendlyName>Guitar</FriendlyName> <VolumePointFirst Amplitude="0.000000" /> <VolumePointLast Amplitude="0.000000" /> <VolumePoints> <VolumePoint PositionMs="4589" Amplitude="1.000000" /> <VolumePoint PositionMs="21945" Amplitude="1.000000" /> <VolumePoint PositionMs="24109" Amplitude="0.860000" /> <VolumePoint PositionMs="34848" Amplitude="0.860000" /> <VolumePoint PositionMs="36167" Amplitude="1.000000" /> <VolumePoint PositionMs="50481" Amplitude="1.000000" /> <VolumePoint PositionMs="52318" Amplitude="0.770000" /> <VolumePoint PositionMs="69392" Amplitude="0.770000" /> <VolumePoint PositionMs="71735" Amplitude="1.000000" /> <VolumePoint PositionMs="114679" Amplitude="1.000000" /> </VolumePoints> </Item> <Item Type="0" Track="0" OffsetMs="2131" Speaker="0" VolumeAmplitude="1.000000" StartPositionMs="0" EndPositionMs="21440"> <Pathname>C:\Temp\1\voice.mp3</Pathname> <FriendlyName>Voice 1</FriendlyName> <VolumePointFirst Amplitude="1.000000" /> <VolumePointLast Amplitude="1.000000" /> </Item> <Item Type="2" Track="4" OffsetMs="20468" VolumeAmplitude="1.000000" StartPositionMs="0" EndPositionMs="18727" Voice="2" RemoveFinalSilence="1"> <SpeechPathname>C:\m_sounds\speech_2.txt</SpeechPathname> <FriendlyName>Spoke voice</FriendlyName> </Item>
.... other items
</Items> </TracksBoardSession>
|
For each item added to the file, the presence of the following set of attributes is mandatory
* Type
* Track
* OffsetMs
* StartPositionMs
* EndPositionMs
* Pathname (audio files only)
* one between SpeechPathname and SpeechString for "Text To Speech" elements
For details about the use of the TracksBoard refer to the How to use the TracksBoard to visually compose songs tutorial.
For further details about methods of the TracksBoard refer to the TracksBoard class section.
Syntax
[Visual Basic] control.TracksBoard.Load ( strPathname as String ) as enumErrorCodes |
[C++] short control.TracksBoard.Load ( LPCTSTR strPathname ); |
Parameter |
Description |
|
|
strPathname |
Absolute pathname of the file containing the session to load |
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred, check the LastError property value in order to get the error code |
enumErrorCodes.ERR_NOERROR (0) |
The method call was successful |
enumErrorCodes.WARN_SESSION_NOT_FULLY_LOADED |
Warning about the fact that, although the loading session was completed, one or more items available inside the session file could not be loaded and were discarded; this could happen when a pathname is wrong or when one of the mandatory attributes is missing |