Working with Audio

Audio can be specified on the movie or scene level. The audio tracks from the movie and the the audiotracks from the scenes are mixed together. This way, you can have an ambient base sound track and a scene specfic voice over.

Reminder

It is easy to forget the audio part when creating movies programmatically. The video you specify in the VisualTracks may contain the audio you want, but the VisualTracks do not take care of the audio. You must specify the scene's audio in the audio property independent from the visual part of the movie.

Setting a base sound track

var audiobase =  new sdl.Audiotrack({
    type: "video_mix",
    source: {
        path: "userdata/ambient-sound.wav"
    }
});

# specify sound in the movie
movie.audio.audiotracks.push(audiobase);

# or, specify a sound in a scene
scene.audio.audiotracks.push(audiobase);

Terms of Use | © 2017, Impossible Software, or its affiliates. All rights reserved.