|
|
int | numberOfSoundTracks () |
| return the number of Audio tracks
|
|
String | nameOfSoundTrack (int index) |
| return the columnName of the audio track at index
|
|
String | addSoundTrack () |
| add a new empty audio track
|
|
bool | deleteSoundTrack (String &columnName) |
| delete audio track
|
|
bool | importSoundBuffer (String &columnName, String &soundFile, unsigned int targetFrame) |
| import a sound file into a given audio track at the specified frame
|
|
QObject * | soundColumn (String &columnName) |
| returns a SoundColumnInterface object that contains a reference to that sound column. The SoundColumnInterface object contains a useful interface to introspecting the sound and its sound sequences.
|
|
This interface is used to access the audio tracks of a storyboard project.
var num = stb.numberOfSoundTracks();
for ( var i = 0; i < num; ++i )
{
System.println( "Name of sound column is " + stb.nameOfSoundTrack(i));
}
stb.importSoundBuffer("Sound", "/home/user/Music/Child_French_Stereo.wav", 25 );
var soundcol = stb.soundColumn("Sound");
if ( soundcol )
{
var sequences = soundcol.sequences();
var numSequences = sequences.length;
for( var sequenceIdx = 0; sequenceIdx < numSequences; ++sequenceIdx )
{
var sequence = sequences[ sequenceIdx ];
var startFrame = sequence.startFrame;
var name = sequence.name;
var filename = sequence.filename;
var len = sequence.stopFrame - sequence.startFrame + 1;
System.println(filename + " has name " + name + " and start " + startFrame + " and length " + len);
}
}