Contents
Navigation
Home User Reference Other Resources


The QTPlgNewSoundTrack class lets you add sound tracks to a movie.







The QTPlgNewSoundTrack class constructors are called when you create a new instance of the class, while the ˜QTPlgNewSoundTrack class destructor, is called automatically when the class is no more in use. Also, you can invoke the class destructor by setting the instance of the class to nil.
Once a new class instance is returned, it is good practice to check the class property to be sure that the new object can be used. See the validity conditions for more details.

The class provides you with the following initializer methods:
(m as , params as )
use this constructor to create a new sound track and add it to the movie specified by the m; if the movie specified has been created in memory (see the of the class), the sound samples added to the track reside in memory as well. You specify the characteristics of the sound samples to be added to the track by setting the of the params object as appropriate

(data as memoryblock, duration as integer, [samplesCount as integer=1])
use this function to add a block of sound data in memory (specified by the data parameter) to the track; you can specify how many samples are contained into the block of memory using the optional samplesCount parameter. The duration of every sample of sound contained within the block of memory is determined by the duration parameter; you must specify this parameter in the media’s time scale. For example, if you are adding sound that was sampled at 22 kHz to a media that contains a sound track with the same time scale, you would set duration to 1. The time scale of the new track’s media is set according to the property of the object passed to the of the class
returns nothing. Check the class property for errors
(sndTrack as , duration as )
this method places a copy of the segment, which is obtained from the track specified by the sndTrack parameter, into this track. You specify the segment of the source track by setting the of the duration parameter; passing nil to the method causes the entire source track to be copied
returns nothing. Check the class property for errors