BB FlashBack SDK: In-movie Presentation Classes

How The Sound Classes Work

The FlashBack SDK can record a number of tracks of sound in a movie. Each track contains a number of non-overlapping sound 'clips'. Each clip can be a sound file or recording.

 

Adding a sound file to a movie

  1. Create a new FBSoundProperties object, setting its volume, start frame, and the name of the sound file it is derived from.
    This will create an FBSoundProperties object containing one FBSoundClip - the sound file.

  2. Use FBEditor::InsertSound to add the FBSoundProperties object to the movie.

 

How to get access to the tracks and sound clips in a movie:

  1. Use FBEditor::GetSounds to get an FBSounds object that contains all the sound tracks in a movie.

  2. Use FBSounds::GetProperties and FBSounds::GetPropertiesByID to get the FBSoundProperties objects.
    Note
    : the FBSoundProperties object should be created by your code and the pointer passed into GetProperties.

  3. Use FBSoundProperties::GetSoundClipProperties to get access to the FBSoundClip objects contained within the FBSoundProperties object.
    Note
    : the FBSoundClip object should be created by your code and the pointer passed into GetSoundClipProperties.

  4. Properties of the sound clip can be changed and written back to the movie with FBSoundProperties::SetSoundClipProperties.

 

How edit operations affect sounds

When your code adds a sound to a movie, via FBEditor::InsertSound, this creates a single 'track' - an FBSoundProperties object - containing one FBSoundClip object.

This single clip can be split into multiple clips by calls to FBMovie::InsertFrames, with the UpdateSounds parameter set to true. If you insert frames into a frame where the clip is playing, and set UpdateSounds to true, silence will be inserted into the clip, effectively breaking it into two clips at the insertion point, separated by silence.