SoundComposer.ItemSlidingWaveToneAdd method |
|
Remarks
Adds a sliding wave tone item to the audio stream previously created through the SoundComposer.SessionInit method.
For further details about sound composing see the the SoundComposerMan class and the How to compose a sound tutorial.
Syntax
[Visual Basic] Public Function ItemSlidingWaveToneAdd ( strFriendlyName as String, nChannel as Int16, nWaveType as enumSoundGenSlidingWaveTypes, fFrequencyStart as Single, fFrequencyEnd as Single, fAmplitudeStart as Single, fAmplitudeEnd as Single, bLogInterpolation as Boolean, nDurationMs as Int32, nFadeInMs as Int32, nFadeOutMs as Int32, nOffsetMs as Int32, ByRef nUniqueId as Int32 ) as enumErrorCodes |
[C#] public enumErrorCodes ItemSlidingWaveToneAdd ( string strFriendlyName, Int16 nChannel, enumSoundGenSlidingWaveTypes nWaveType, float fFrequencyStart, float fFrequencyEnd, float fAmplitudeStart, float fAmplitudeEnd, bool bLogInterpolation, Int32 nDurationMs, Int32 nFadeInMs, Int32 nFadeOutMs, Int32 nOffsetMs, ref Int32 nUniqueId ); |
[C++] public: enumErrorCodes ItemSlidingWaveToneAdd ( string strFriendlyName, Int16 nChannel, enumSoundGenSlidingWaveTypes nWaveType, float fFrequencyStart, float fFrequencyEnd, float fAmplitudeStart, float fAmplitudeEnd, bool bLogInterpolation, Int32 nDurationMs, Int32 nFadeInMs, Int32 nFadeOutMs, Int32 nOffsetMs, Int32 __gc *nUniqueId ); |
Parameter |
Description |
|||||||||||||||
|
|
|||||||||||||||
strFriendlyName |
Friendly name of the item |
|||||||||||||||
nChannel |
Channel of the audio stream that will reproduce the item: can be a value between 0 and the number of channels of the audio stream created through the SoundComposer.SessionInit method. |
|||||||||||||||
nWaveType |
Type of wave tone. Supported values are the following:
|
|||||||||||||||
fFrequencyStart |
Initial wave tone frequency expressed in Hertz, e.g. 700 |
|||||||||||||||
fFrequencyEnd |
Final wave tone frequency expressed in Hertz, e.g. 1000 |
|||||||||||||||
fAmplitudeStart |
Initial wave tone amplitude. - value 0.0 means that sound volume is muted - values higher than 0.0 and lower than 1.0 attenuates the sound volume - value 1.0 sets the sound at full volume - values higher than 1.0 amplifies the sound volume |
|||||||||||||||
fAmplitudeEnd |
Final wave tone amplitude. - 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 |
|||||||||||||||
bLogInterpolation |
Boolean value indicating if the sliding should use linear or logarithmic interpolation. Supported values are the following:
|
|||||||||||||||
nDurationMs |
Duration of the wave tone expressed in milliseconds |
|||||||||||||||
nFadeInMs |
Duration of the fade-in at the beginning of the tone expressed in milliseconds. Set this value to 0 if you don't need to apply a fade-in at the beginning of the audio stream. |
|||||||||||||||
nFadeOutMs |
Duration of the fade-out at the end of the tone expressed in milliseconds. Set this value to 0 if you don't need to apply a fade-out at the end of the audio stream. |
|||||||||||||||
nOffsetMs |
Offset of the sliding wave tone, expressed in milliseconds, respect to the beginning of the audio stream. |
|||||||||||||||
nUniqueId |
Reference to a value that, on return from the method call, will contain the unique identifier of the newly added element: this unique identifier will be used in order to invoke further methods related to the use of this specific element:
- SoundComposer.ItemSlidingWaveToneLimitsGet to obtain the initial and final frequency/amplitude of the sliding wave tone - SoundComposer.ItemSlidingWaveToneLimitsSet to modify the initial and final frequency/amplitude of the sliding wave tone - SoundComposer.ItemSlidingWaveToneTypeGet to obtain the current type of sliding wave tone - SoundComposer.ItemSlidingWaveToneTypeSet to modify the current type of sliding wave tone
- SoundComposer.ItemChannelGet to obtain the channel of of the audio stream that will reproduce the item - SoundComposer.ItemChannelSet to modify the channel of of the audio stream that will reproduce the item - SoundComposer.ItemRemove to remove the item from the sound composition - SoundComposer.ItemDurationGet to obtain the duration, expressed in milliseconds, of the item - SoundComposer.ItemDurationSet to modify the duration, expressed in milliseconds, of the item - SoundComposer.ItemOffsetGet to obtain the offset, expressed in milliseconds, of the item respect to the beginning of the audio stream - SoundComposer.ItemOffsetSet to modify the offset, expressed in milliseconds, of the item respect to the beginning of the audio stream - SoundComposer.ItemTypeGet to obtain the item's type - SoundComposer.ItemFriendlyNameGet to obtain the friendly name of the item - SoundComposer.ItemFriendlyNameSet to modify the friendly name of the item
The usage of the SoundComposer.ItemAmplitudeGet and SoundComposer.ItemAmplitudeSet methods is not supported on sliding wave tones; use the SoundComposer.ItemSlidingWaveToneLimitsGet and SoundComposer.ItemSlidingWaveToneLimitsSet methods to obtain and modify the initial and final frequency/amplitude of the sliding wave tone. |
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred (see the LastError property for further error details) |
enumErrorCodes.NOERROR (0) |
The method call was successful. |