Methods (44) Properties (4)
Namespace: CSCore.XAudio2

Syntax

public class XAudio2Voice : ComObject

Base Type

Summary

Represents the base class from which XAudio2SourceVoice, XAudio2SubmixVoice and XAudio2MasteringVoice are derived.

Uses

Used by

Methods

XAudio2Voice(IntPtr ptr, XAudio2Version version)

Initializes a new instance of the XAudio2Voice class.

public void XAudio2Voice(IntPtr ptr, XAudio2Version version)

Parameters

ptr

IntPtr

Native pointer of the XAudio2Voice object.

version

XAudio2Version

The XAudio2Version to use.

DestroyVoice()

Destroys the voice. If necessary, stops the voice and removes it from the XAudio2 graph.

public void DestroyVoice()

DisableEffect(Int32 effectIndex)

Disables the effect at a given position in the effect chain of the voice.

public void DisableEffect(Int32 effectIndex)

Parameters

effectIndex

Int32

Zero-based index of an effect in the effect chain of the voice.

DisableEffect(Int32 effectIndex, Int32 operationSet)

Disables the effect at a given position in the effect chain of the voice.

public void DisableEffect(Int32 effectIndex, Int32 operationSet)

Parameters

effectIndex

Int32

Zero-based index of an effect in the effect chain of the voice.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

DisableEffectNative(Int32 effectIndex, Int32 operationSet)

Disables the effect at a given position in the effect chain of the voice.

public Int32 DisableEffectNative(Int32 effectIndex, Int32 operationSet)

Parameters

effectIndex

Int32

Zero-based index of an effect in the effect chain of the voice.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

Returns

HRESULT

Dispose(Boolean disposing)

Disposes the XAudio2Voice and calls the DestroyVoice method..

protected void Dispose(Boolean disposing)

Parameters

disposing

Boolean

True to release both managed and unmanaged resources; false to release only unmanaged resources.

EnableEffect(Int32 effectIndex)

Enables the effect at a given position in the effect chain of the voice.

public void EnableEffect(Int32 effectIndex)

Parameters

effectIndex

Int32

Zero-based index of an effect in the effect chain of the voice.

EnableEffect(Int32 effectIndex, Int32 operationSet)

Enables the effect at a given position in the effect chain of the voice.

public void EnableEffect(Int32 effectIndex, Int32 operationSet)

Parameters

effectIndex

Int32

Zero-based index of an effect in the effect chain of the voice.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

EnableEffectNative(Int32 effectIndex, Int32 operationSet)

Enables the effect at a given position in the effect chain of the voice.

public Int32 EnableEffectNative(Int32 effectIndex, Int32 operationSet)

Parameters

effectIndex

Int32

Zero-based index of an effect in the effect chain of the voice.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

Returns

HRESULT

GetChannelVolumes(Int32 channelCount)

Returns the volume levels for the voice, per channel. These settings are applied after the effect chain is applied. This method is valid only for source and submix voices, because mastering voices do not specify volume per channel.

public Single[] GetChannelVolumes(Int32 channelCount)

Parameters

channelCount

Int32

Confirms the channel count of the voice.

Returns

Returns the current volume level of each channel in the voice. The has at least channelCount elements.

Remarks

The master volume level is applied at different times depending on the type of voice. For submix and mastering voices the volume level is applied just before the voice's built in filter and effect chain is applied. For source voices the master volume level is applied after the voice's filter and effect chain is applied. Volume levels are expressed as floating-point amplitude multipliers between -2^24 and 2^24, with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase.

GetChannelVolumesNative(Int32 channelCount, Single[] volumes)

Returns the volume levels for the voice, per channel. These settings are applied after the effect chain is applied. This method is valid only for source and submix voices, because mastering voices do not specify volume per channel.

public Int32 GetChannelVolumesNative(Int32 channelCount, Single[] volumes)

Parameters

channelCount

Int32

Confirms the channel count of the voice.

volumes

Single[]

Returns the current volume level of each channel in the voice. The array must have at least channelCount elements. See remarks for more information on volume levels.

Returns

HRESULT

Remarks

The master volume level is applied at different times depending on the type of voice. For submix and mastering voices the volume level is applied just before the voice's built in filter and effect chain is applied. For source voices the master volume level is applied after the voice's filter and effect chain is applied. Volume levels are expressed as floating-point amplitude multipliers between -2^24 and 2^24, with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase.

GetEffectParameters(Int32 effectIndex)

Returns the current effect-specific parameters of a given effect in the voice's effect chain.

public T GetEffectParameters<T>(Int32 effectIndex)

Parameters

effectIndex

Int32

Zero-based index of an effect within the voice's effect chain.

Type Parameters

T

Effect parameters.

Returns

Effect parameters value.

GetEffectParametersNative(Int32 effectIndex, IntPtr effectParameters, Int32 parametersByteSize)

Returns the current effect-specific parameters of a given effect in the voice's effect chain.

public Int32 GetEffectParametersNative(Int32 effectIndex, IntPtr effectParameters, Int32 parametersByteSize)

Parameters

effectIndex

Int32

Zero-based index of an effect within the voice's effect chain.

effectParameters

IntPtr

Returns the current values of the effect-specific parameters.

parametersByteSize

Int32

Size of the effectParameters array in bytes.

Returns

HRESULT

GetEffectStateNative(Int32 effectIndex, NativeBool& enabled)

Returns the running state of the effect at a specified position in the effect chain of the voice.

public void GetEffectStateNative(Int32 effectIndex, NativeBool& enabled)

Parameters

effectIndex

Int32

Zero-based index of an effect in the effect chain of the voice.

enabled

NativeBool&

Returns true if the effect is enabled. If the effect is disabled, returns false.

GetFilterParameters()

Gets the voice's filter parameters.

public FilterParameters GetFilterParameters()

Returns

FilterParameters structure containing the filter information.

public Int32 GetFilterParametersNative(FilterParameters& filterParameters)

Parameters

filterParameters

FilterParameters&

FilterParameters structure containing the filter information.

Returns

HRESULT

GetOutputFilterParameters(XAudio2Voice destinationVoice)

Returns the filter parameters from one of this voice's sends.

public FilterParameters GetOutputFilterParameters(XAudio2Voice destinationVoice)

Parameters

destinationVoice

XAudio2Voice

The destination voice of the send whose filter parameters will be read.

Returns

FilterParameters structure containing the filter information.

public Int32 GetOutputFilterParametersNative(XAudio2Voice destinationVoice, FilterParameters& filterParameters)

Parameters

destinationVoice

XAudio2Voice

The destination voice of the send whose filter parameters will be read.

filterParameters

FilterParameters&

FilterParameters structure containing the filter information.

Returns

HRESULT

GetOutputMatrix(XAudio2Voice destinationVoice, Int32 sourceChannels, Int32 destinationChannels, Single[] levelMatrix)

Gets the volume level of each channel of the final output for the voice. These channels are mapped to the input channels of a specified destination voice.

public void GetOutputMatrix(XAudio2Voice destinationVoice, Int32 sourceChannels, Int32 destinationChannels, Single[] levelMatrix)

Parameters

destinationVoice

XAudio2Voice

The destination XAudio2Voice to retrieve the output matrix for.

sourceChannels

Int32

Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain.

destinationChannels

Int32

Confirms the input channel count of the destination voice.

levelMatrix

Single[]

Array of [SourceChannels × DestinationChannels] volume levels sent to the destination voice. The level sent from source channel S to destination channel D is specified in the form levelMatrix[SourceChannels × D + S]. For more details see http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.getoutputmatrix(v=vs.85).aspx.

GetOutputMatrixNative(XAudio2Voice destinationVoice, Int32 sourceChannels, Int32 destinationChannels, Single[] levelMatrix)

Gets the volume level of each channel of the final output for the voice. These channels are mapped to the input channels of a specified destination voice.

public Int32 GetOutputMatrixNative(XAudio2Voice destinationVoice, Int32 sourceChannels, Int32 destinationChannels, Single[] levelMatrix)

Parameters

destinationVoice

XAudio2Voice

The destination XAudio2Voice to retrieve the output matrix for.

sourceChannels

Int32

Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain.

destinationChannels

Int32

Confirms the input channel count of the destination voice.

levelMatrix

Single[]

Array of [SourceChannels × DestinationChannels] volume levels sent to the destination voice. The level sent from source channel S to destination channel D is specified in the form levelMatrix[SourceChannels × D + S]. For more details see http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.getoutputmatrix(v=vs.85).aspx.

Returns

HRESULT

GetVoiceDetailsNative(VoiceDetails& voiceDetails)

Returns information about the creation flags, input channels, and sample rate of a voice.

public Int32 GetVoiceDetailsNative(VoiceDetails& voiceDetails)

Parameters

voiceDetails

VoiceDetails&

VoiceDetails object containing information about the voice.

Returns

HRESULT

GetVolume()

Gets the current overall volume level of the voice.

public Single GetVolume()

Returns

The current overall volume level of the voice. See Remarks for more information on volume levels.

Remarks

The master volume level is applied at different times depending on the type of voice. For submix and mastering voices the volume level is applied just before the voice's built in filter and effect chain is applied. For source voices the master volume level is applied after the voice's filter and effect chain is applied. Volume levels are expressed as floating-point amplitude multipliers between -2^24 and 2^24, with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase.

GetVolumeNative(Single& volume)

Gets the current overall volume level of the voice.

public Int32 GetVolumeNative(Single& volume)

Parameters

volume

Single&

Returns the current overall volume level of the voice. See Remarks for more information on volume levels.

Returns

HRESULT

Remarks

The master volume level is applied at different times depending on the type of voice. For submix and mastering voices the volume level is applied just before the voice's built in filter and effect chain is applied. For source voices the master volume level is applied after the voice's filter and effect chain is applied. Volume levels are expressed as floating-point amplitude multipliers between -2^24 and 2^24, with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase.

IsEffectEnabled(Int32 effectIndex)

Returns whether the effect at the specified position in the effect chain is enabled.

public Boolean IsEffectEnabled(Int32 effectIndex)

Parameters

effectIndex

Int32

Zero-based index of an effect in the effect chain of the voice.

Returns

Returns true if the effect is enabled. If the effect is disabled, returns false.

SetChannelVolumes(Int32 channelCount, Single[] volumes)

Sets the volume levels for the voice, per channel. This method is valid only for source and submix voices, because mastering voices do not specify volume per channel.

public void SetChannelVolumes(Int32 channelCount, Single[] volumes)

Parameters

channelCount

Int32

Number of channels in the voice.

volumes

Single[]

Array containing the new volumes of each channel in the voice. The array must have channelCount elements. See Remarks for more information on volume levels.

Remarks

The master volume level is applied at different times depending on the type of voice. For submix and mastering voices the volume level is applied just before the voice's built in filter and effect chain is applied. For source voices the master volume level is applied after the voice's filter and effect chain is applied. Volume levels are expressed as floating-point amplitude multipliers between -2^24 and 2^24, with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase.

SetChannelVolumes(Int32 channelCount, Single[] volumes, Int32 operationSet)

Sets the volume levels for the voice, per channel. This method is valid only for source and submix voices, because mastering voices do not specify volume per channel.

public void SetChannelVolumes(Int32 channelCount, Single[] volumes, Int32 operationSet)

Parameters

channelCount

Int32

Number of channels in the voice.

volumes

Single[]

Array containing the new volumes of each channel in the voice. The array must have channelCount elements. See Remarks for more information on volume levels.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

Remarks

The master volume level is applied at different times depending on the type of voice. For submix and mastering voices the volume level is applied just before the voice's built in filter and effect chain is applied. For source voices the master volume level is applied after the voice's filter and effect chain is applied. Volume levels are expressed as floating-point amplitude multipliers between -2^24 and 2^24, with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase.

SetChannelVolumesNative(Int32 channelCount, Single[] volumes, Int32 operationSet)

Sets the volume levels for the voice, per channel. This method is valid only for source and submix voices, because mastering voices do not specify volume per channel.

public Int32 SetChannelVolumesNative(Int32 channelCount, Single[] volumes, Int32 operationSet)

Parameters

channelCount

Int32

Number of channels in the voice.

volumes

Single[]

Array containing the new volumes of each channel in the voice. The array must have channelCount elements. See Remarks for more information on volume levels.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

Returns

HRESULT

Remarks

The master volume level is applied at different times depending on the type of voice. For submix and mastering voices the volume level is applied just before the voice's built in filter and effect chain is applied. For source voices the master volume level is applied after the voice's filter and effect chain is applied. Volume levels are expressed as floating-point amplitude multipliers between -2^24 and 2^24, with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase.

SetEffectChain(EffectDescriptor[] effectDescriptors)

Replaces the effect chain of the voice.

public void SetEffectChain(EffectDescriptor[] effectDescriptors)

Parameters

effectDescriptors

EffectDescriptor[]

Describes the new effect chain to use. If null is passed, the current effect chain is removed.

SetEffectChainNative(Nullable effectChain)

Replaces the effect chain of the voice.

public Int32 SetEffectChainNative(Nullable effectChain)

Parameters

effectChain

Nullable

Describes the new effect chain to use. If null is passed, the current effect chain is removed.

Returns

HRESULT

SetEffectParameters(Int32 effectIndex, T effectParameters)

Sets parameters for a given effect in the voice's effect chain.

public void SetEffectParameters<T>(Int32 effectIndex, T effectParameters)

Parameters

effectIndex

Int32

Zero-based index of an effect within the voice's effect chain.

effectParameters

T

New values of the effect-specific parameters.

Type Parameters

T

Effect parameter.

SetEffectParameters(Int32 effectIndex, T effectParameters, Int32 operationSet)

Sets parameters for a given effect in the voice's effect chain.

public void SetEffectParameters<T>(Int32 effectIndex, T effectParameters, Int32 operationSet)

Parameters

effectIndex

Int32

Zero-based index of an effect within the voice's effect chain.

effectParameters

T

New values of the effect-specific parameters.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

Type Parameters

T

Effect parameter.

public Int32 SetEffectParametersNative(Int32 effectIndex, IntPtr effectParameters, Int32 parametersByteSize, Int32 operationSet)

Parameters

effectIndex

Int32

Zero-based index of an effect within the voice's effect chain.

effectParameters

IntPtr

New values of the effect-specific parameters.

parametersByteSize

Int32

Size of the effectParameters array in bytes.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

Returns

HRESULT

public void SetFilterParameters(FilterParameters filterParameters, Int32 operationSet)

Parameters

filterParameters

FilterParameters

FilterParameters structure containing the filter information.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

public Int32 SetFilterParametersNative(FilterParameters filterParameters, Int32 operationSet)

Parameters

filterParameters

FilterParameters

FilterParameters structure containing the filter information.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

Returns

HRESULT

public void SetOutputFilterParameters(XAudio2Voice destinationVoice, FilterParameters filterParameters)

Parameters

destinationVoice

XAudio2Voice

The destination voice of the send whose filter parameters will be set.

filterParameters

FilterParameters

FilterParameters structure containing the filter information.

public void SetOutputFilterParameters(XAudio2Voice destinationVoice, FilterParameters filterParameters, Int32 operationSet)

Parameters

destinationVoice

XAudio2Voice

The destination voice of the send whose filter parameters will be set.

filterParameters

FilterParameters

FilterParameters structure containing the filter information.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

public Int32 SetOutputFilterParametersNative(XAudio2Voice destinationVoice, FilterParameters filterParameters, Int32 operationSet)

Parameters

destinationVoice

XAudio2Voice

The destination voice of the send whose filter parameters will be set.

filterParameters

FilterParameters

FilterParameters structure containing the filter information.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

Returns

HRESULT

SetOutputMatrix(XAudio2Voice destinationVoice, Int32 sourceChannels, Int32 destinationChannels, Single[] levelMatrix)

Sets the volume level of each channel of the final output for the voice. These channels are mapped to the input channels of a specified destination voice.

public void SetOutputMatrix(XAudio2Voice destinationVoice, Int32 sourceChannels, Int32 destinationChannels, Single[] levelMatrix)

Parameters

destinationVoice

XAudio2Voice

Destination XAudio2Voice for which to set volume levels. If the voice sends to a single target voice then specifying null will cause SetOutputMatrix to operate on that target voice.

sourceChannels

Int32

Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain.

destinationChannels

Int32

Confirms the input channel count of the destination voice.

levelMatrix

Single[]

Array of [SourceChannels × DestinationChannels] volume levels sent to the destination voice. The level sent from source channel S to destination channel D is specified in the form levelMatrix[SourceChannels × D + S]. For more details see http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.setoutputmatrix(v=vs.85).aspx.

SetOutputMatrix(XAudio2Voice destinationVoice, Int32 sourceChannels, Int32 destinationChannels, Single[] levelMatrix, Int32 operationSet)

Sets the volume level of each channel of the final output for the voice. These channels are mapped to the input channels of a specified destination voice.

public void SetOutputMatrix(XAudio2Voice destinationVoice, Int32 sourceChannels, Int32 destinationChannels, Single[] levelMatrix, Int32 operationSet)

Parameters

destinationVoice

XAudio2Voice

Destination XAudio2Voice for which to set volume levels. If the voice sends to a single target voice then specifying null will cause SetOutputMatrix to operate on that target voice.

sourceChannels

Int32

Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain.

destinationChannels

Int32

Confirms the input channel count of the destination voice.

levelMatrix

Single[]

Array of [SourceChannels × DestinationChannels] volume levels sent to the destination voice. The level sent from source channel S to destination channel D is specified in the form levelMatrix[SourceChannels × D + S]. For more details see http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.setoutputmatrix(v=vs.85).aspx.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

SetOutputMatrixNative(XAudio2Voice destinationVoice, Int32 sourceChannels, Int32 destinationChannels, Single[] levelMatrix, Int32 operationSet)

Sets the volume level of each channel of the final output for the voice. These channels are mapped to the input channels of a specified destination voice.

public Int32 SetOutputMatrixNative(XAudio2Voice destinationVoice, Int32 sourceChannels, Int32 destinationChannels, Single[] levelMatrix, Int32 operationSet)

Parameters

destinationVoice

XAudio2Voice

Destination XAudio2Voice for which to set volume levels. If the voice sends to a single target voice then specifying null will cause SetOutputMatrix to operate on that target voice.

sourceChannels

Int32

Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain.

destinationChannels

Int32

Confirms the input channel count of the destination voice.

levelMatrix

Single[]

Array of [SourceChannels × DestinationChannels] volume levels sent to the destination voice. The level sent from source channel S to destination channel D is specified in the form levelMatrix[SourceChannels × D + S]. For more details see http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.setoutputmatrix(v=vs.85).aspx.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

Returns

HRESULT

SetOutputVoices(VoiceSendDescriptor[] voiceSendDescriptors)

Designates a new set of submix or mastering voices to receive the output of the voice.

public void SetOutputVoices(VoiceSendDescriptor[] voiceSendDescriptors)

Parameters

voiceSendDescriptors

VoiceSendDescriptor[]

Array of VoiceSendDescriptors. if voiceSendDescriptors is null, the voice will send its output to the current mastering voice. All voices in the voiceSendDescriptors must have the same input sample rate.

SetOutputVoicesNative(Nullable voiceSends)

Designates a new set of submix or mastering voices to receive the output of the voice.

public Int32 SetOutputVoicesNative(Nullable voiceSends)

Parameters

voiceSends

Nullable

VoiceSends structure which contains Output voices. If voiceSends is null, the voice will send its output to the current mastering voice. All of the voices in a send list must have the same input sample rate.

Returns

HRESULT

SetVolume(Single volume, Int32 operationSet)

Sets the overall volume level for the voice.

public void SetVolume(Single volume, Int32 operationSet)

Parameters

volume

Single

Overall volume level to use. See Remarks for more information on volume levels.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

Remarks

The master volume level is applied at different times depending on the type of voice. For submix and mastering voices the volume level is applied just before the voice's built in filter and effect chain is applied. For source voices the master volume level is applied after the voice's filter and effect chain is applied. Volume levels are expressed as floating-point amplitude multipliers between -2^24 and 2^24, with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase.

SetVolumeNative(Single volume, Int32 operationSet)

Sets the overall volume level for the voice.

public Int32 SetVolumeNative(Single volume, Int32 operationSet)

Parameters

volume

Single

Overall volume level to use. See Remarks for more information on volume levels.

operationSet

Int32

Identifies this call as part of a deferred batch. For more information see http://msdn.microsoft.com/en-us/library/windows/desktop/ee415807(v=vs.85).aspx.

Returns

HRESULT

Remarks

The master volume level is applied at different times depending on the type of voice. For submix and mastering voices the volume level is applied just before the voice's built in filter and effect chain is applied. For source voices the master volume level is applied after the voice's filter and effect chain is applied. Volume levels are expressed as floating-point amplitude multipliers between -2^24 and 2^24, with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase.

Properties

FilterParameters

Gets or sets the FilterParameters of the XAudio2Voice.

public FilterParameters FilterParameters { get; set; }

Version

Gets the XAudio2 Version.

public XAudio2Version Version { get; }

VoiceDetails

Gets the VoiceDetails of the XAudio2Voice. These details include information about the number of input channels, the sample rate and the VoiceFlags.

public VoiceDetails VoiceDetails { get; }

Volume

Gets or sets the volume of the XAudio2Voice. The default value is 1.0.

public Single Volume { get; set; }

Remarks

The master volume level is applied at different times depending on the type of voice. For submix and mastering voices the volume level is applied just before the voice's built in filter and effect chain is applied. For source voices the master volume level is applied after the voice's filter and effect chain is applied. Volume levels are expressed as floating-point amplitude multipliers between -2^24 and 2^24, with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase.