Remarks
Sets the parameters used for mixing a sound to the actual recording session contents.
This feature is very useful if you want to apply a background sound to your recording session. The background sound can be also put in loop for a given range.
For details about applying a background sound to your recording session, take a look to the How to mix sounds to your recording session tutorial.
Syntax
[Visual Basic]
control.SetMixingParams (
nStartPosition as Long,
nEndPosition as Long,
nNewSoundSeekPosition as Long,
bStopMixOnCompletion as enumBoolean,
bLoop as enumBoolean,
fVolumeOriginalSound as Single,
fVolumeNewSound as Single,
nScaleType as enumVolumeScales
) as enumErrorCodes
|
|
[C++]
short control.SetMixingParams (
Int32 nStartPosition,
Int32 nEndPosition,
Int32 nNewSoundSeekPosition,
bool bStopMixOnCompletion,
bool bLoop,
float fVolumeOriginalSound,
float fVolumeNewSound,
short nScaleType
);
|
|
Parameter
|
Description
|
|
|
nStartPosition
|
Number representing the start position, expressed in milliseconds, inside the recording session where the mixing will begin
|
nEndPosition
|
Number representing the end position, expressed in milliseconds, inside the recording session where the mixing will end: if this parameter is set to -1, the mixing will be applied till the end of the recording session
|
nNewSoundSeekPosition
|
Initial seek position, expressed in milliseconds, inside the loaded sound: sound data before this position will be ignored and not mixed to the actual contents of the recording session
|
bStopMixOnCompletion
|
Boolean value that specifies if the mixing session should stop when the end of the current recording session or the nEndPosition position are reached
|
bLoop
|
Boolean value that specifies if the sound mixed to the recording session must be put in loop: it's important to note that, if the input sound file in loop mode should exceed the defined range limit, it would be in any case mixed until its completion so no unwanted cut would result on the input sound.
|
fVolumeOriginalSound
|
Floating point value representing the volume applied to the portion of recording session affected by the mixing session: the unit of this parameter depends upon the value of the nScaleType parameter
|
fVolumeNewSound
|
Floating point value representing the volume applied to the loaded sound that will be mixed to the actual recording session contents: the unit of this parameter depends upon the value of the nScaleType parameter
|
nScaleType
|
The volume scaling type.
Supported values are the following:
Mnemonic constant
|
Value
|
Meaning
|
SCALE_LINEAR
|
0
|
Volume, expressed in percentage, is based upon a linear scale and can be in the range from 0.0 (silence) to 100.0 (max volume)
|
SCALE_LOG
|
1
|
Volume, expressed in dB, is based upon a logarithmic scale and can be in the range from -100 (silence) to 0 (max volume)
The actual applied formula for converting a linear volume into a logarithmic volume is the following:
VolumeInDB = 20 * log10 (VolumeLinear/100)
The C syntax for converting a logarithmic volume into a linear volume is the following:
VolumeLinear = 100 * pow (10, VolumeInDB/20);
|
|
Return value
Value
|
Meaning
|
|
|
Negative value
|
An error occurred, check the LastError property value in order to see the error code meaning
|
enumErrorCodes.ERR_NOERROR (0)
|
The method call was successful.
|
|