SoundComposer.ItemSoundFileVolumeSlidingAdd method |
|
Remarks
Adds a new linear volume sliding to the sound file item when it will be merged into the session's stream. Current parameters of a specific volume sliding can be obtained through the SoundComposer.ItemSoundFileVolumeSlidingGet method.
A specific linear volume sliding can be removed through the SoundComposer.ItemSoundFileVolumeSlidingRemove method.
There is no limit upon the number of linear volume sliding you can add to the sound file and each sliding is identified by a unique identifier: the total number of existing linear volume sliding can be obtained through the SoundComposer.ItemSoundFileVolumeSlidingNumGet method and the unique identifier for each of them can be obtained through the SoundComposer.ItemSoundFileVolumeSlidingUniqueIdGet method.
The linear volume fading implemented by this method applies to any position within the sound file item, including the initial fade-in and the final fade-out: as mentioned, the volume sliding implemented by this method is always linear so, in case you should need better control over the volume curve for initial and final fades, you may use the SoundComposer.ItemSoundFileVolumeFadingSet method.
For further details about sound composing see the the SoundComposer object and the How to compose a sound tutorial.
Syntax
[Visual Basic] control.SoundComposer.ItemSoundFileVolumeSlidingAdd ( nUniqueId as Long, nSlideStartPosMs as Long, nSlideLengthMs as Long, fVolumeAmpltudeStart as Single, fVolumeAmpltudeEnd as Single, ByRef nVolumeSlidingUniqueId as Long ) as enumErrorCodes |
[C++] short control.SoundComposer.ItemSoundFileVolumeSlidingAdd ( long nUniqueId, long nSlideStartPosMs, long nSlideLengthMs, float fVolumeAmpltudeStart, float fVolumeAmpltudeEnd, long *nVolumeSlidingUniqueId ); |
Parameter |
Description |
|
|
nUniqueId |
The unique identifier of the sound file item previously returned by the call to one of the following methods: SoundComposer.ItemSoundFileAdd, SoundComposer.ItemSoundFileMemoryAdd, SoundComposer.ItemSoundFileRawAdd, SoundComposer.ItemSoundFileMemoryRawAdd, SoundComposer.ItemSoundFileFromEditorAdd,or SoundComposer.ItemSoundFileFromRecorderAdd. |
nSlideStartPosMs |
Initial position of the sliding expressed in milliseconds |
nSlideLengthMs |
Length of the sliding expressed in milliseconds |
fVolumeAmpltudeStart |
Initial volume amplitude of the sliding. - value 0.0 means that sound volume is muted - values higher than 0.0 and lower than 1.0 attenuate the sound volume - value 1.0 sets the sound at full volume - values higher than 1.0 amplify the sound volume |
fVolumeAmpltudeEnd |
Final volume amplitude of the sliding. - value 0.0 means that sound volume is muted - values higher than 0.0 and lower than 1.0 attenuate the sound volume - value 1.0 sets the sound at full volume - values higher than 1.0 amplify the sound volume |
nVolumeSlidingUniqueId |
Reference to a value that, on return from the method call, will contain the unique identifier of the new added linear volume sliding: this unique identifier will be used in order to invoke further methods related to the use of this specific linear volume sliding: - SoundComposer.ItemSoundFileVolumeSlidingGet to obtain parameters of the linear volume sliding - SoundComposer.ItemSoundFileVolumeSlidingRemove to remove the linear volume sliding |
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 |