Remarks
Sets the parameters used for mixing an existing 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]
Public Function SetMixingParams (
nStartPosition as Int32,
nEndPosition as Int32,
nNewSoundSeekPosition as Int32,
bStopMixOnCompletion as Boolean,
bLoop as Boolean,
fVolumeOriginalSound as Single,
fVolumeNewSound as Single,
nScaleType as enumVolumeScales
) as enumErrorCodes
|
|
[C#]
public enumErrorCodes SetMixingParams (
Int32 nStartPosition,
Int32 nEndPosition,
Int32 nNewSoundSeekPosition,
bool bStopMixOnCompletion,
bool bLoop,
float fVolumeOriginalSound,
float fVolumeNewSound,
enumVolumeScales nScaleType
);
|
|
[C++]
public: enumErrorCodes SetMixingParams (
Int32 nStartPosition,
Int32 nEndPosition,
Int32 nNewSoundSeekPosition,
bool bStopMixOnCompletion,
bool bLoop,
float fVolumeOriginalSound,
float fVolumeNewSound,
enumVolumeScales 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
|
fVolumeNewSound
|
Floating point value representing the volume applied to the loaded sound that will be mixed to the actual recording session contents
|
nScaleType
|
The volume scaling type.
Supported values are the following:
Mnemonic constant
|
Value
|
Meaning
|
SCALE_LINEAR
|
0
|
The passed volume is based upon a linear scale and can be in the range from 0.0 (silence) to 100.0 (max volume)
|
SCALE_LOG
|
1
|
The passed 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 (see the LastError property for further error details)
|
enumErrorCodes.ERR_NOERROR (0)
|
The method call was successful.
|
|