SharpDX.XAudio2 The assembly provides managed and APIs. hh405049 XAudio2 XAudio2

Represents an audio data buffer, used with .

XAudio2 audio data is interleaved, data from each channel is adjacent for a particular sample number. For example if there was a 4 channel wave playing into an XAudio2 source voice, the audio data would be a sample of channel 0, a sample of channel 1, a sample of channel 2, a sample of channel 3, and then the next sample of channels 0, 1, 2, 3, etc.

The AudioBytes and pAudioData members of correspond to the size in bytes and contents of the 'data' RIFF chunk of the file being played. The contents of the chunk may need to be byte swapped when loading the file on Xbox 360.

Memory allocated to hold a or structure can be freed as soon as the call it is passed to returns. The data the structure points to (pAudioData and pDecodedPacketCumulativeBytes, respectively) can't be freed until the buffer completes (as signaled by the callback) or the voice is stopped or destroyed.

microsoft.directx_sdk.xaudio2.xaudio2_buffer XAUDIO2_BUFFER XAUDIO2_BUFFER
Initializes a new instance of the class. Initializes a new instance of the class. The stream to get the audio buffer from. Initializes a new instance of the class. The buffer to get the audio buffer from. Gets or sets the data stream associated to this audio buffer The stream. Constant LoopInfinite. XAUDIO2_LOOP_INFINITE No documentation. microsoft.directx_sdk.xaudio2.xaudio2_buffer XAUDIO2_BUFFER_FLAGS Flags XAUDIO2_BUFFER_FLAGS Flags No documentation. microsoft.directx_sdk.xaudio2.xaudio2_buffer unsigned int AudioBytes unsigned int AudioBytes No documentation. microsoft.directx_sdk.xaudio2.xaudio2_buffer const unsigned char* pAudioData unsigned char pAudioData No documentation. microsoft.directx_sdk.xaudio2.xaudio2_buffer unsigned int PlayBegin unsigned int PlayBegin No documentation. microsoft.directx_sdk.xaudio2.xaudio2_buffer unsigned int PlayLength unsigned int PlayLength No documentation. microsoft.directx_sdk.xaudio2.xaudio2_buffer unsigned int LoopBegin unsigned int LoopBegin No documentation. microsoft.directx_sdk.xaudio2.xaudio2_buffer unsigned int LoopLength unsigned int LoopLength No documentation. microsoft.directx_sdk.xaudio2.xaudio2_buffer unsigned int LoopCount unsigned int LoopCount No documentation. microsoft.directx_sdk.xaudio2.xaudio2_buffer void* pContext void pContext Device role, only valid for XAudio27. XAUDIO2_DEVICE_ROLE XAUDIO2_DEVICE_ROLE No documentation. NotDefaultDevice NotDefaultDevice No documentation. DefaultConsoleDevice DefaultConsoleDevice No documentation. DefaultMultimediaDevice DefaultMultimediaDevice No documentation. DefaultCommunicationsDevice DefaultCommunicationsDevice No documentation. DefaultGameDevice DefaultGameDevice No documentation. GlobalDefaultDevice GlobalDefaultDevice No documentation. InvalidDeviceRole InvalidDeviceRole Details of the device, only valid for XAudio27. XAUDIO2_DEVICE_DETAILS XAUDIO2_DEVICE_DETAILS No documentation. wchar_t DeviceID[256] wchar_t DeviceID No documentation. wchar_t DisplayName[256] wchar_t DisplayName No documentation. XAUDIO2_DEVICE_ROLE Role XAUDIO2_DEVICE_ROLE Role No documentation. WAVEFORMATEXTENSIBLE OutputFormat WAVEFORMATEXTENSIBLE OutputFormat

Contains information about an XAPO for use in an effect chain.

XAPO instances are passed to XAudio2 as interfaces and XAudio2 uses IXAPO::QueryInterface to acquire an interface and to detect whether the XAPO implements the interface.

For additional information on using XAPOs with XAudio2 see How to: Create an Effect Chain and How to: Use an XAPO in XAudio2.

microsoft.directx_sdk.xaudio2.xaudio2_effect_descriptor XAUDIO2_EFFECT_DESCRIPTOR XAUDIO2_EFFECT_DESCRIPTOR
Initializes a new instance of the class with a Stereo Effect. The effect. Initializes a new instance of the class. The effect. The output channel count. Gets or sets the AudioProcessor. The AudioProcessor cannot be set more than one. The effect. No documentation. microsoft.directx_sdk.xaudio2.xaudio2_effect_descriptor IUnknown* pEffect IUnknown pEffect No documentation. microsoft.directx_sdk.xaudio2.xaudio2_effect_descriptor BOOL InitialState BOOL InitialState No documentation. microsoft.directx_sdk.xaudio2.xaudio2_effect_descriptor unsigned int OutputChannels unsigned int OutputChannels The IXAudio2EngineCallback interface contains methods that notify the client when certain events happen in the engine. This interface should be implemented by the XAudio2 client. XAudio2 calls these methods via an interface pointer provided by the client, using either the {{XAudio2Create}} or method. Methods in this interface return void, rather than an HRESULT. IXAudio2EngineCallback

The interface contains methods that notify the client when certain events happen in the engine.

This interface should be implemented by the XAudio2 client. XAudio2 calls these methods via an interface reference provided by the client, using the XAudio2Create method. Methods in this interface return void, rather than an .

See XAudio2 Callbacks for restrictions on callback implementation.

  • Methods
microsoft.directx_sdk.ixaudio2enginecallback.ixaudio2enginecallback IXAudio2EngineCallback IXAudio2EngineCallback
Called by XAudio2 just before an audio processing pass begins. void IXAudio2EngineCallback::OnProcessingPassStart() Called by XAudio2 just after an audio processing pass ends. void IXAudio2EngineCallback::OnProcessingPassEnd() Called if a critical system error occurs that requires XAudio2 to be closed down and restarted. Error code returned by XAudio2. void IXAudio2EngineCallback::OnCriticalError([None] HRESULT Error) Internal EngineCallback Callback Implementation Return a pointer to the unmanaged version of this callback. The callback. A pointer to a shadow c++ callback Called by XAudio2 just after an audio processing pass ends. void IXAudio2EngineCallback::OnProcessingPassEnd() Called if a critical system error occurs that requires XAudio2 to be closed down and restarted. This pointer Error code returned by XAudio2. void IXAudio2EngineCallback::OnCriticalError([None] HRESULT Error) EventArgs used by . Initializes a new instance of the class. The error code. Gets or sets the error code. The error code. A Reverb XAudio2 AudioProcessor. Functions Initializes a new instance of the class. Initializes a new instance of the class. Constant MinWetDryMix. XAUDIO2FX_REVERB_MIN_WET_DRY_MIX Constant MinReflectionsDelay. XAUDIO2FX_REVERB_MIN_REFLECTIONS_DELAY Constant MinReverbDelay. XAUDIO2FX_REVERB_MIN_REVERB_DELAY Constant MinRearDelay. XAUDIO2FX_REVERB_MIN_REAR_DELAY Constant MinPosition. XAUDIO2FX_REVERB_MIN_POSITION Constant MinDiffusion. XAUDIO2FX_REVERB_MIN_DIFFUSION Constant MinLowEqGain. XAUDIO2FX_REVERB_MIN_LOW_EQ_GAIN Constant MinLowEqCutoff. XAUDIO2FX_REVERB_MIN_LOW_EQ_CUTOFF Constant MinHighEqGain. XAUDIO2FX_REVERB_MIN_HIGH_EQ_GAIN Constant MinHighEqCutoff. XAUDIO2FX_REVERB_MIN_HIGH_EQ_CUTOFF Constant MinRoomFilterFreq. XAUDIO2FX_REVERB_MIN_ROOM_FILTER_FREQ Constant MinRoomFilterMain. XAUDIO2FX_REVERB_MIN_ROOM_FILTER_MAIN Constant MinRoomFilterHf. XAUDIO2FX_REVERB_MIN_ROOM_FILTER_HF Constant MinReflectionsGain. XAUDIO2FX_REVERB_MIN_REFLECTIONS_GAIN Constant MinReverbGain. XAUDIO2FX_REVERB_MIN_REVERB_GAIN Constant MinDecayTime. XAUDIO2FX_REVERB_MIN_DECAY_TIME Constant MinDensity. XAUDIO2FX_REVERB_MIN_DENSITY Constant MinRoomSize. XAUDIO2FX_REVERB_MIN_ROOM_SIZE Constant MaxWetDryMix. XAUDIO2FX_REVERB_MAX_WET_DRY_MIX Constant MaxReflectionsDelay. XAUDIO2FX_REVERB_MAX_REFLECTIONS_DELAY Constant MaxReverbDelay. XAUDIO2FX_REVERB_MAX_REVERB_DELAY Constant MaxRearDelay. XAUDIO2FX_REVERB_MAX_REAR_DELAY Constant MaxPosition. XAUDIO2FX_REVERB_MAX_POSITION Constant MaxDiffusion. XAUDIO2FX_REVERB_MAX_DIFFUSION Constant MaxLowEqGain. XAUDIO2FX_REVERB_MAX_LOW_EQ_GAIN Constant MaxLowEqCutoff. XAUDIO2FX_REVERB_MAX_LOW_EQ_CUTOFF Constant MaxHighEqGain. XAUDIO2FX_REVERB_MAX_HIGH_EQ_GAIN Constant MaxHighEqCutoff. XAUDIO2FX_REVERB_MAX_HIGH_EQ_CUTOFF Constant MaxRoomFilterFreq. XAUDIO2FX_REVERB_MAX_ROOM_FILTER_FREQ Constant MaxRoomFilterMain. XAUDIO2FX_REVERB_MAX_ROOM_FILTER_MAIN Constant MaxRoomFilterHf. XAUDIO2FX_REVERB_MAX_ROOM_FILTER_HF Constant MaxReflectionsGain. XAUDIO2FX_REVERB_MAX_REFLECTIONS_GAIN Constant MaxReverbGain. XAUDIO2FX_REVERB_MAX_REVERB_GAIN Constant MaxDensity. XAUDIO2FX_REVERB_MAX_DENSITY Constant MaxRoomSize. XAUDIO2FX_REVERB_MAX_ROOM_SIZE Constant DefaultWetDryMix. XAUDIO2FX_REVERB_DEFAULT_WET_DRY_MIX Constant DefaultReflectionsDelay. XAUDIO2FX_REVERB_DEFAULT_REFLECTIONS_DELAY Constant DefaultReverbDelay. XAUDIO2FX_REVERB_DEFAULT_REVERB_DELAY Constant DefaultRearDelay. XAUDIO2FX_REVERB_DEFAULT_REAR_DELAY Constant DefaultPosition. XAUDIO2FX_REVERB_DEFAULT_POSITION Constant DefaultPositionMatrix. XAUDIO2FX_REVERB_DEFAULT_POSITION_MATRIX Constant DefaultEarlyDiffusion. XAUDIO2FX_REVERB_DEFAULT_EARLY_DIFFUSION Constant DefaultLateDiffusion. XAUDIO2FX_REVERB_DEFAULT_LATE_DIFFUSION Constant DefaultLowEqGain. XAUDIO2FX_REVERB_DEFAULT_LOW_EQ_GAIN Constant DefaultLowEqCutoff. XAUDIO2FX_REVERB_DEFAULT_LOW_EQ_CUTOFF Constant DefaultHighEqGain. XAUDIO2FX_REVERB_DEFAULT_HIGH_EQ_GAIN Constant DefaultHighEqCutoff. XAUDIO2FX_REVERB_DEFAULT_HIGH_EQ_CUTOFF Constant DefaultRoomFilterFreq. XAUDIO2FX_REVERB_DEFAULT_ROOM_FILTER_FREQ Constant DefaultRoomFilterMain. XAUDIO2FX_REVERB_DEFAULT_ROOM_FILTER_MAIN Constant DefaultRoomFilterHf. XAUDIO2FX_REVERB_DEFAULT_ROOM_FILTER_HF Constant DefaultReflectionsGain. XAUDIO2FX_REVERB_DEFAULT_REFLECTIONS_GAIN Constant DefaultReverbGain. XAUDIO2FX_REVERB_DEFAULT_REVERB_GAIN Constant DefaultDecayTime. XAUDIO2FX_REVERB_DEFAULT_DECAY_TIME Constant DefaultDensity. XAUDIO2FX_REVERB_DEFAULT_DENSITY Constant DefaultRoomSize. XAUDIO2FX_REVERB_DEFAULT_ROOM_SIZE

Describes I3DL2 (Interactive 3D Audio Rendering Guidelines Level 2.0) parameters for use in the ReverbConvertI3DL2ToNative function.

There are many preset values defined for the structure. For more information, see XAUDIO2FX_I3DL2_PRESET.

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters XAUDIO2FX_REVERB_I3DL2_PARAMETERS XAUDIO2FX_REVERB_I3DL2_PARAMETERS
Standard I3DL2 reverb presets (100% wet). No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters float WetDryMix float WetDryMix No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters int Room int Room No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters int RoomHF int RoomHF No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters float RoomRolloffFactor float RoomRolloffFactor No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters float DecayTime float DecayTime No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters float DecayHFRatio float DecayHFRatio No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters int Reflections int Reflections No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters float ReflectionsDelay float ReflectionsDelay No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters int Reverb int Reverb No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters float ReverbDelay float ReverbDelay No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters float Diffusion float Diffusion No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters float Density float Density No documentation. microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_i3dl2_parameters float HFReference float HFReference

Describes parameters for use in the reverb APO.

All parameters related to sampling rate or time are relative to a 48kHz voice and must be scaled for use with other sampling rates. For example, setting ReflectionsDelay to 300ms gives a true 300ms delay when the reverb is hosted in a 48kHz voice, but becomes a 150ms delay when hosted in a 24kHz voice.

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters XAUDIO2FX_REVERB_PARAMETERS XAUDIO2FX_REVERB_PARAMETERS
Defines an explicit conversion of a to . The value to convert. A that represents the converted . The is converted to using the same logic as the inline function "ReverbConvertI3DL2ToNative" from "XAudio2fx.h".

Percentage of the output that will be reverb. Allowable values are from 0 to 100.

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters float WetDryMix float WetDryMix

The delay time of the first reflection relative to the direct path. Permitted range is from 0 to 300 milliseconds.

Note??All parameters related to sampling rate or time are relative to a 48kHz sampling rate and must be scaled for use with other sampling rates. See remarks section below for additional information. ?
microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned int ReflectionsDelay unsigned int ReflectionsDelay

Delay of reverb relative to the first reflection. Permitted range is from 0 to 85 milliseconds.

Note??All parameters related to sampling rate or time are relative to a 48kHz sampling rate and must be scaled for use with other sampling rates. See remarks section below for additional information. ?
microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char ReverbDelay unsigned char ReverbDelay

Delay for the left rear output and right rear output. Permitted range is from 0 to 5 milliseconds.

Note??All parameters related to sampling rate or time are relative to a 48kHz sampling rate and must be scaled for use with other sampling rates. See remarks section below for additional information. ?
microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char RearDelay unsigned char RearDelay

Delay for the left side output and right side output. Permitted range is from 0 to 5 milliseconds.

Note??This value is supported beginning with Windows?10. ? Note??All parameters related to sampling rate or time are relative to a 48kHz sampling rate and must be scaled for use with other sampling rates. See remarks section below for additional information. ?
microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char SideDelay unsigned char SideDelay

Position of the left input within the simulated space relative to the listener. With PositionLeft set to the minimum value, the left input is placed close to the listener. In this position, early reflections are dominant, and the reverb decay is set back in the sound field and reduced in amplitude. With PositionLeft set to the maximum value, the left input is placed at a maximum distance from the listener within the simulated room. PositionLeft does not affect the reverb decay time (liveness of the room), only the apparent position of the source relative to the listener. Permitted range is from 0 to 30 (no units).

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char PositionLeft unsigned char PositionLeft

Same as PositionLeft, but affecting only the right input. Permitted range is from 0 to 30 (no units).

Note??PositionRight is ignored in mono-in/mono-out mode. ?
microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char PositionRight unsigned char PositionRight

Gives a greater or lesser impression of distance from the source to the listener. Permitted range is from 0 to 30 (no units).

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char PositionMatrixLeft unsigned char PositionMatrixLeft

Gives a greater or lesser impression of distance from the source to the listener. Permitted range is from 0 to 30 (no units).

Note??PositionMatrixRight is ignored in mono-in/mono-out mode. ?
microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char PositionMatrixRight unsigned char PositionMatrixRight

Controls the character of the individual wall reflections. Set to minimum value to simulate a hard flat surface and to maximum value to simulate a diffuse surface. Permitted range is from 0 to 15 (no units).

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char EarlyDiffusion unsigned char EarlyDiffusion

Controls the character of the individual wall reverberations. Set to minimum value to simulate a hard flat surface and to maximum value to simulate a diffuse surface. Permitted range is from 0 to 15 (no units).

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char LateDiffusion unsigned char LateDiffusion

Adjusts the decay time of low frequencies relative to the decay time at 1 kHz. The values correspond to dB of gain as follows:

Value0123456789101112
Gain (dB)-8-7-6-5-4-3-2-10+1+2+3+4

?

Note??A LowEQGain value of 8 results in the decay time of low frequencies being equal to the decay time at 1 kHz. ?

Permitted range is from 0 to 12 (no units).

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char LowEQGain unsigned char LowEQGain

Sets the corner frequency of the low pass filter that is controlled by the LowEQGain parameter. The values correspond to frequency in Hz as follows:

Value0123456789
Frequency (Hz)50100150200250300350400450500

?

Permitted range is from 0 to 9 (no units).

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char LowEQCutoff unsigned char LowEQCutoff

Adjusts the decay time of high frequencies relative to the decay time at 1 kHz. When set to zero, high frequencies decay at the same rate as 1 kHz. When set to maximum value, high frequencies decay at a much faster rate than 1 kHz.

Value012345678
Gain (dB)-8-7-6-5-4-3-2-10

?

Permitted range is from 0 to 8 (no units).

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char HighEQGain unsigned char HighEQGain

Sets the corner frequency of the high pass filter that is controlled by the HighEQGain parameter. The values correspond to frequency in kHz as follows:

Value01234567891011121314
Frequency (kHz)11.522.533.544.555.566.577.58

?

Permitted range is from 0 to 14 (no units).

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters unsigned char HighEQCutoff unsigned char HighEQCutoff

Sets the corner frequency of the low pass filter for the room effect. Permitted range is from 20 to 20,000 Hz.

Note??All parameters related to sampling rate or time are relative to a 48kHz sampling rate and must be scaled for use with other sampling rates. See remarks section below for additional information. ?
microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters float RoomFilterFreq float RoomFilterFreq

Sets the pass band intensity level of the low-pass filter for both the early reflections and the late field reverberation. Permitted range is from -100 to 0 dB.

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters float RoomFilterMain float RoomFilterMain

Sets the intensity of the low-pass filter for both the early reflections and the late field reverberation at the corner frequency (RoomFilterFreq). Permitted range is from -100 to 0 dB.

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters float RoomFilterHF float RoomFilterHF

Adjusts the intensity of the early reflections. Permitted range is from -100 to 20 dB.

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters float ReflectionsGain float ReflectionsGain

Adjusts the intensity of the reverberations. Permitted range is from -100 to 20 dB.

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters float ReverbGain float ReverbGain

Reverberation decay time at 1 kHz. This is the time that a full scale input signal decays by 60 dB. Permitted range is from 0.1 to infinity seconds.

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters float DecayTime float DecayTime

Controls the modal density in the late field reverberation. For colorless spaces, Density should be set to the maximum value (100). As Density is decreased, the sound becomes hollow (comb filtered). This is an effect that can be useful if you are trying to model a silo. Permitted range as a percentage is from 0 to 100.

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters float Density float Density

The apparent size of the acoustic space. Permitted range is from 1 to 100 feet.

microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters float RoomSize float RoomSize

If set to TRUE, disables late field reflection calculations. Disabling late field reflection calculations results in a significant CPU time savings.

Note??The DirectX SDK versions of XAUDIO2 don't support this member. ?
microsoft.directx_sdk.xaudio2.xaudio2fx_reverb_parameters BOOL DisableLateField BOOL DisableLateField
A VolumeMeter XAudio2 AudioProcessor. Initializes a new instance of the class. The device. Initializes a new instance of the class. The device. if set to true [is using debug]. XAudio2 must be initialized before calling this constructor XAudio2FxContants Functions. Constant None. Constant None. Constant None. Constant None.

Describes parameters for use with the volume meter APO.

This structure is used with the XAudio2 method.

pPeakLevels and pRMSLevels are not returned by , the arrays are only filled out if they are present. If pPeakLevels and pRMSLevels are used they must be allocated by the application. The application is responsible for freeing the arrays when they are no longer needed.

ChannelCount must be set by the application to match the number of channels in the voice the effect is applied to.

microsoft.directx_sdk.xaudio2.xaudio2fx_volumemeter_levels XAUDIO2FX_VOLUMEMETER_LEVELS XAUDIO2FX_VOLUMEMETER_LEVELS

Array that will be filled with the maximum absolute level for each channel during a processing pass. The array must be at least ChannelCount ? sizeof(float) bytes. pPeakLevels may be null if pRMSLevels is not null.

microsoft.directx_sdk.xaudio2.xaudio2fx_volumemeter_levels float* pPeakLevels float pPeakLevels

Array that will be filled with root mean square level for each channel during a processing pass. The array must be at least ChannelCount ? sizeof(float) bytes. pRMSLevels may be null if pPeakLevels is not null.

microsoft.directx_sdk.xaudio2.xaudio2fx_volumemeter_levels float* pRMSLevels float pRMSLevels

Number of channels being processed.

microsoft.directx_sdk.xaudio2.xaudio2fx_volumemeter_levels unsigned int ChannelCount unsigned int ChannelCount

Represents an audio data buffer, used with .

XAudio2 audio data is interleaved, data from each channel is adjacent for a particular sample number. For example if there was a 4 channel wave playing into an XAudio2 source voice, the audio data would be a sample of channel 0, a sample of channel 1, a sample of channel 2, a sample of channel 3, and then the next sample of channels 0, 1, 2, 3, etc.

The AudioBytes and pAudioData members of correspond to the size in bytes and contents of the 'data' RIFF chunk of the file being played. The contents of the chunk may need to be byte swapped when loading the file on Xbox 360.

Memory allocated to hold a or structure can be freed as soon as the call it is passed to returns. The data the structure points to (pAudioData and pDecodedPacketCumulativeBytes, respectively) can't be freed until the buffer completes (as signaled by the callback) or the voice is stopped or destroyed.

microsoft.directx_sdk.xaudio2.xaudio2_buffer XAUDIO2_BUFFER_FLAGS XAUDIO2_BUFFER_FLAGS
No documentation. microsoft.directx_sdk.xaudio2.xaudio2_buffer XAUDIO2_END_OF_STREAM XAUDIO2_END_OF_STREAM None. None None

Indicates the filter type.

Note??Note that the DirectX SDK versions of XAUDIO2 do not support the LowPassOnePoleFilter or the HighPassOnePoleFilter.? microsoft.directx_sdk.xaudio2.xaudio2_filter_type XAUDIO2_FILTER_TYPE XAUDIO2_FILTER_TYPE

Attenuates (reduces) frequencies above the cutoff frequency.

microsoft.directx_sdk.xaudio2.xaudio2_filter_type LowPassFilter LowPassFilter

Attenuates frequencies outside a given range.

microsoft.directx_sdk.xaudio2.xaudio2_filter_type BandPassFilter BandPassFilter

Attenuates frequencies below the cutoff frequency.

microsoft.directx_sdk.xaudio2.xaudio2_filter_type HighPassFilter HighPassFilter

Attenuates frequencies inside a given range.

microsoft.directx_sdk.xaudio2.xaudio2_filter_type NotchFilter NotchFilter

Attenuates frequencies above the cutoff frequency. This is a one-pole filter, and .OneOverQ has no effect.

microsoft.directx_sdk.xaudio2.xaudio2_filter_type LowPassOnePoleFilter LowPassOnePoleFilter

Attenuates frequencies below the cutoff frequency. This is a one-pole filter, and .OneOverQ has no effect.

microsoft.directx_sdk.xaudio2.xaudio2_filter_type HighPassOnePoleFilter HighPassOnePoleFilter
No documentation. XAUDIO2_LOG_TYPE XAUDIO2_LOG_TYPE No documentation. XAUDIO2_LOG_ERRORS XAUDIO2_LOG_ERRORS No documentation. XAUDIO2_LOG_WARNINGS XAUDIO2_LOG_WARNINGS No documentation. XAUDIO2_LOG_INFO XAUDIO2_LOG_INFO No documentation. XAUDIO2_LOG_DETAIL XAUDIO2_LOG_DETAIL No documentation. XAUDIO2_LOG_API_CALLS XAUDIO2_LOG_API_CALLS No documentation. XAUDIO2_LOG_FUNC_CALLS XAUDIO2_LOG_FUNC_CALLS No documentation. XAUDIO2_LOG_TIMING XAUDIO2_LOG_TIMING No documentation. XAUDIO2_LOG_LOCKS XAUDIO2_LOG_LOCKS No documentation. XAUDIO2_LOG_MEMORY XAUDIO2_LOG_MEMORY No documentation. XAUDIO2_LOG_STREAMING XAUDIO2_LOG_STREAMING No documentation. XAUDIO2_PLAY_FLAGS XAUDIO2_PLAY_FLAGS No documentation. XAUDIO2_PLAY_TAILS XAUDIO2_PLAY_TAILS None. None None No documentation. XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER No documentation. Processor1 Processor1 No documentation. Processor2 Processor2 No documentation. Processor3 Processor3 No documentation. Processor4 Processor4 No documentation. Processor5 Processor5 No documentation. Processor6 Processor6 No documentation. Processor7 Processor7 No documentation. Processor8 Processor8 No documentation. Processor9 Processor9 No documentation. Processor10 Processor10 No documentation. Processor11 Processor11 No documentation. Processor12 Processor12 No documentation. Processor13 Processor13 No documentation. Processor14 Processor14 No documentation. Processor15 Processor15 No documentation. Processor16 Processor16 No documentation. Processor17 Processor17 No documentation. Processor18 Processor18 No documentation. Processor19 Processor19 No documentation. Processor20 Processor20 No documentation. Processor21 Processor21 No documentation. Processor22 Processor22 No documentation. Processor23 Processor23 No documentation. Processor24 Processor24 No documentation. Processor25 Processor25 No documentation. Processor26 Processor26 No documentation. Processor27 Processor27 No documentation. Processor28 Processor28 No documentation. Processor29 Processor29 No documentation. Processor30 Processor30 No documentation. Processor31 Processor31 No documentation. Processor32 Processor32 No documentation. XAUDIO2_ANY_PROCESSOR XAUDIO2_ANY_PROCESSOR No documentation. XAUDIO2_DEFAULT_PROCESSOR XAUDIO2_DEFAULT_PROCESSOR

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

Note the DirectX SDK versions of XAUDIO2 do not support the ActiveFlags member.

microsoft.directx_sdk.xaudio2.xaudio2_voice_details XAUDIO2_VOICE_FLAGS XAUDIO2_VOICE_FLAGS

Flags used to create the voice; see the individual voice interfaces for more information.

microsoft.directx_sdk.xaudio2.xaudio2_voice_details XAUDIO2_VOICE_NOPITCH XAUDIO2_VOICE_NOPITCH

Flags that are currently set on the voice.

microsoft.directx_sdk.xaudio2.xaudio2_voice_details XAUDIO2_VOICE_NOSRC XAUDIO2_VOICE_NOSRC

The number of input channels the voice expects.

microsoft.directx_sdk.xaudio2.xaudio2_voice_details XAUDIO2_VOICE_USEFILTER XAUDIO2_VOICE_USEFILTER

The input sample rate the voice expects.

microsoft.directx_sdk.xaudio2.xaudio2_voice_details XAUDIO2_VOICE_NOSAMPLESPLAYED XAUDIO2_VOICE_NOSAMPLESPLAYED
None. None None No documentation. XAUDIO2_VOICE_SEND_FLAGS XAUDIO2_VOICE_SEND_FLAGS No documentation. XAUDIO2_SEND_USEFILTER XAUDIO2_SEND_USEFILTER None. None None

XAudio2 constants that specify default parameters, maximum values, and flags.

XAudio2 boundary values

ee419230 XAUDIO2_FLAGS XAUDIO2_FLAGS
No documentation. ee419230 XAUDIO2_DEBUG_ENGINE XAUDIO2_DEBUG_ENGINE None. None None Functions Constant InvalidCall. XAUDIO2_E_INVALID_CALL Constant XmaDecoderError. XAUDIO2_E_XMA_DECODER_ERROR Constant XapoCreationFailed. XAUDIO2_E_XAPO_CREATION_FAILED Constant DeviceInvalidated. XAUDIO2_E_DEVICE_INVALIDATED Functions

A mastering voice is used to represent the audio output device.

Data buffers cannot be submitted directly to mastering voices, but data submitted to other types of voices must be directed to a mastering voice to be heard.

inherits directly from , but does not implement methods specific to mastering voices. The interface type exists solely because some of the base class methods are implemented differently for mastering voices. Having a separate type for these voices helps client code to distinguish the different voice types and to benefit from C++ type safety.

microsoft.directx_sdk.ixaudio2masteringvoice.ixaudio2masteringvoice IXAudio2MasteringVoice IXAudio2MasteringVoice
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Returns the channel mask for this voice.

Returns the channel mask for this voice. This corresponds to the dwChannelMask member of the structure.

This method does not return a value.

The pChannelMask argument is a bit-mask of the various channels in the speaker geometry reported by the audio system. This information is needed for the X3DAudioInitialize SpeakerChannelMask parameter.

The X3DAUDIO.H header declares a number of SPEAKER_ positional defines to decode these channels masks.

Examples include:

 //  (0x1) |  (0x2)   //  (0x1) |  (0x2) // |  (0x4) // |  (0x8) // |  (0x10) |  (0x20)
Note??For the DirectX SDK versions of XAUDIO, the channel mask for the output device was obtained via the IXAudio2::GetDeviceDetails method, which doesn't exist in Windows?8 and later.?
microsoft.directx_sdk.ixaudio2masteringvoice.ixaudio2masteringvoice.getchannelmask HRESULT IXAudio2MasteringVoice::GetChannelMask([Out] unsigned int* pChannelmask) IXAudio2MasteringVoice::GetChannelMask
Creates and configures a mastering voice. an instance of [in] Number of channels the mastering voice expects in its input audio. InputChannels must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. InputChannels can be set to XAUDIO2_DEFAULT_CHANNELS, with the default being determined by the current platform. Windows Attempts to detect the system speaker configuration setup. Xbox 360 Defaults to 5.1 surround. [in] Sample rate of the input audio data of the mastering voice. This rate must be a multiple of XAUDIO2_QUANTUM_DENOMINATOR. InputSampleRate must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. InputSampleRate can be set to XAUDIO2_DEFAULT_SAMPLERATE, with the default being determined by the current platform. Windows Windows XP defaults to 44100. Windows Vista and Windows 7 default to the setting specified in the Sound Control Panel. The default for this setting is 44100 (or 48000 if required by the driver). Xbox 360 Defaults to 48000. [in] Index of the output device that will be sent input by the mastering voice. Specifying the default value of 0 causes XAudio2 to select the global default audio device. HRESULT IXAudio2::CreateMasteringVoice([Out] IXAudio2MasteringVoice** ppMasteringVoice,[None] UINT32 InputChannels,[None] UINT32 InputSampleRate,[None] UINT32 Flags,[None] UINT32 DeviceIndex,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a mastering voice (Valid only for XAudio2.8) an instance of [in] Number of channels the mastering voice expects in its input audio. InputChannels must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. InputChannels can be set to XAUDIO2_DEFAULT_CHANNELS, with the default being determined by the current platform. Windows Attempts to detect the system speaker configuration setup. Xbox 360 Defaults to 5.1 surround. [in] Sample rate of the input audio data of the mastering voice. This rate must be a multiple of XAUDIO2_QUANTUM_DENOMINATOR. InputSampleRate must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. InputSampleRate can be set to XAUDIO2_DEFAULT_SAMPLERATE, with the default being determined by the current platform. Windows Windows XP defaults to 44100. Windows Vista and Windows 7 default to the setting specified in the Sound Control Panel. The default for this setting is 44100 (or 48000 if required by the driver). Xbox 360 Defaults to 48000. [in] Index of the output device that will be sent input by the mastering voice. Specifying the default value of 0 causes XAudio2 to select the global default audio device. HRESULT IXAudio2::CreateMasteringVoice([Out] IXAudio2MasteringVoice** ppMasteringVoice,[None] UINT32 InputChannels,[None] UINT32 InputSampleRate,[None] UINT32 Flags,[None] UINT32 DeviceIndex,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a mastering voice (Valid only for XAudio2.7) an instance of [in] Number of channels the mastering voice expects in its input audio. InputChannels must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. InputChannels can be set to XAUDIO2_DEFAULT_CHANNELS, with the default being determined by the current platform. Windows Attempts to detect the system speaker configuration setup. Xbox 360 Defaults to 5.1 surround. [in] Sample rate of the input audio data of the mastering voice. This rate must be a multiple of XAUDIO2_QUANTUM_DENOMINATOR. InputSampleRate must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. InputSampleRate can be set to XAUDIO2_DEFAULT_SAMPLERATE, with the default being determined by the current platform. Windows Windows XP defaults to 44100. Windows Vista and Windows 7 default to the setting specified in the Sound Control Panel. The default for this setting is 44100 (or 48000 if required by the driver). Xbox 360 Defaults to 48000. Index of the device. HRESULT IXAudio2::CreateMasteringVoice([Out] IXAudio2MasteringVoice** ppMasteringVoice,[None] UINT32 InputChannels,[None] UINT32 InputSampleRate,[None] UINT32 Flags,[None] UINT32 DeviceIndex,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain)

Returns the channel mask for this voice. (Only valid for XAudio 2.8, returns 0 otherwise)

The pChannelMask argument is a bit-mask of the various channels in the speaker geometry reported by the audio system. This information is needed for the SpeakerChannelMask parameter.

The X3DAUDIO.H header declares a number of SPEAKER_ positional defines to decode these channels masks.

Examples include:

 //  (0x1) |  (0x2)   //  (0x1) |  (0x2) // |  (0x4) // |  (0x8) // |  (0x10) |  (0x20)

Note??For the DirectX SDK versions of XAUDIO, the channel mask for the output device was obtained via the IXAudio2::GetDeviceDetails method, which doesn't exist in Windows?8 and later.

microsoft.directx_sdk.ixaudio2masteringvoice.ixaudio2masteringvoice.getchannelmask GetChannelMask GetChannelMask HRESULT IXAudio2MasteringVoice::GetChannelMask([Out] unsigned int* pChannelmask)

Use a source voice to submit audio data to the XAudio2 processing pipeline.You must send voice data to a mastering voice to be heard, either directly or through intermediate submix voices.

microsoft.directx_sdk.ixaudio2sourcevoice.ixaudio2sourcevoice IXAudio2SourceVoice IXAudio2SourceVoice
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Returns the frequency adjustment ratio of the voice.

GetFrequencyRatio always returns the voice's actual current frequency ratio. However, this may not match the ratio set by the most recent call: the actual ratio is only changed the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).

For information on frequency ratios, see .

microsoft.directx_sdk.ixaudio2sourcevoice.ixaudio2sourcevoice.getfrequencyratio GetFrequencyRatio GetFrequencyRatio void IXAudio2SourceVoice::GetFrequencyRatio([Out] float* pRatio)

Reconfigures the voice to consume source data at a different sample rate than the rate specified when the voice was created.

The SetSourceSampleRate method supports reuse of XAudio2 voices by allowing a voice to play sounds with a variety of sample rates. To use SetSourceSampleRate the voice must have been created without the or flags and must not have any buffers currently queued.

The typical use of SetSourceSampleRate is to support voice pooling. For example to support voice pooling an application would precreate all the voices it expects to use. Whenever a new sound will be played the application chooses an inactive voice or ,if all voices are busy, picks the least important voice and calls SetSourceSampleRate on the voice with the new sound's sample rate. After SetSourceSampleRate has been called on the voice, the application can immediately start submitting and playing buffers with the new sample rate. This allows the application to avoid the overhead of creating and destroying voices frequently during gameplay.

microsoft.directx_sdk.ixaudio2sourcevoice.ixaudio2sourcevoice.setsourcesamplerate SetSourceSampleRate SetSourceSampleRate HRESULT IXAudio2SourceVoice::SetSourceSampleRate([In] unsigned int NewSourceSampleRate)

Starts consumption and processing of audio by the voice. Delivers the result to any connected submix or mastering voices, or to the output device.

Flags that control how the voice is started. Must be 0.

Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

If the XAudio2 engine is stopped, the voice stops running. However, it remains in the started state, so that it starts running again as soon as the engine starts.

When first created, source voices are in the stopped state. Submix and mastering voices are in the started state.

After Start is called it has no further effect if called again before is called. In addition multiple calls to Start without matching calls to will result in warning messages in debug builds.

microsoft.directx_sdk.ixaudio2sourcevoice.ixaudio2sourcevoice.start HRESULT IXAudio2SourceVoice::Start([In] unsigned int Flags,[In] unsigned int OperationSet) IXAudio2SourceVoice::Start

Stops consumption of audio by the current voice.

Flags that control how the voice is stopped. Can be 0 or the following:

ValueDescription
Continue emitting effect output after the voice is stopped.?

?

Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

All source buffers that are queued on the voice and the current cursor position are preserved. This allows the voice to continue from where it left off, when it is restarted. The method can be used to flush queued source buffers.

By default, any pending output from voice effects?for example, reverb tails?is not played. Instead, the voice is immediately rendered silent. The flag can be used to continue emitting effect output after the voice stops running.

A voice stopped with the flag stops consuming source buffers, but continues to process its effects and send audio to its destination voices. A voice in this state can later be stopped completely by calling Stop again with the Flags argument set to 0. This enables stopping a voice with , waiting sufficient time for any audio being produced by its effects to finish, and then fully stopping the voice by calling Stop again without . This technique allows voices with effects to be stopped gracefully while ensuring idle voices will not continue to be processed after they have finished producing audio.

Stop is always asynchronous, even if called within a callback.

Note??XAudio2 never calls any voice callbacks for a voice if the voice is stopped (even if it was stopped with ).?
microsoft.directx_sdk.ixaudio2sourcevoice.ixaudio2sourcevoice.stop HRESULT IXAudio2SourceVoice::Stop([In] XAUDIO2_PLAY_FLAGS Flags,[In] unsigned int OperationSet) IXAudio2SourceVoice::Stop

Adds a new audio buffer to the voice queue.

Pointer to an structure to queue.

Pointer to an additional structure used when submitting WMA data.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

The voice processes and plays back the buffers in its queue in the order that they were submitted.

The structure includes details about the audio buffer's location and size, the part of the buffer that should actually be played, the loop region (if any) and loop count, the context reference to be used in any callbacks relating to this buffer, and an optional flag that indicates that it is the last buffer of a contiguous sound.

If the voice is started and has no buffers queued, the new buffer will start playing immediately. If the voice is stopped, the buffer is added to the voice's queue and will be played when the voice starts.

If only part of the given buffer should be played, the PlayBegin and PlayLength fields in the can be used to specify the region to be played. A PlayLength value of 0 means to play the entire buffer (and in this case PlayBegin must be 0 as well).

If all or part of the buffer should be played in a continuous loop, the LoopBegin, LoopLength and LoopCount fields in can be used to specify the characteristics of the loop region. A LoopBegin value of means that no looping should be performed, and in this case LoopLength and LoopCount must be given as 0. If a loop region is specified, it must be non-empty (LoopLength > 0), and the loop count must be between 1 and inclusive (or to specify an endless loop which will only end when is called). A loop count of N means to skip backwards N times, i.e. to play the loop region N+1 times.

If an explicit play region is specified, it must begin and end within the given audio buffer (or, in the compressed case, within the set of samples that the buffer will decode to). In addition, the loop region cannot end past the end of the play region.

Xbox 360
For certain audio formats, there may be additional restrictions on the valid endpoints of any play or loop regions; e.g. for XMA buffers, the regions can only begin or end at 128-sample boundaries in the decoded audio.

?

The pBuffer reference can be reused or freed immediately after calling this method, but the actual audio data referenced by pBuffer must remain valid until the buffer has been fully consumed by XAudio2 (which is indicated by the callback).

Up to buffers can be queued on a voice at any one time.

SubmitSourceBuffer takes effect immediately when called from an XAudio2 callback with an OperationSet of .

Xbox 360
This method can be called from an Xbox system thread (most other XAudio2 methods cannot). However, a maximum of two source buffers can be submitted from a system thread at a time.

?

microsoft.directx_sdk.ixaudio2sourcevoice.ixaudio2sourcevoice.submitsourcebuffer HRESULT IXAudio2SourceVoice::SubmitSourceBuffer([In] const XAUDIO2_BUFFER* pBuffer,[In] const void* pBufferWMA) IXAudio2SourceVoice::SubmitSourceBuffer

Removes all pending audio buffers from the voice queue.

Returns if successful, an error code otherwise.

If the voice is started, the buffer that is currently playing is not removed from the queue.

FlushSourceBuffers can be called regardless of whether the voice is currently started or stopped.

For every buffer removed, an OnBufferEnd callback will be made, but none of the other per-buffer callbacks (OnBufferStart, OnStreamEnd or OnLoopEnd) will be made.

FlushSourceBuffers does not change a the voice's running state, so if the voice was playing a buffer prior to the call, it will continue to do so, and will deliver all the callbacks for the buffer normally. This means that the OnBufferEnd callback for this buffer will take place after the OnBufferEnd callbacks for the buffers that were removed. Thus, an XAudio2 client that calls FlushSourceBuffers cannot expect to receive OnBufferEnd callbacks in the order in which the buffers were submitted.

No warnings for starvation of the buffer queue will be emitted when the currently playing buffer completes; it is assumed that the client has intentionally removed the buffers that followed it. However, there may be an audio pop if this buffer does not end at a zero crossing. If the application must ensure that the flush operation takes place while a specific buffer is playing?perhaps because the buffer ends with a zero crossing?it must call FlushSourceBuffers from a callback, so that it executes synchronously.

Calling FlushSourceBuffers after a voice is stopped and then submitting new data to the voice resets all of the voice's internal counters.

A voice's state is not considered reset after calling FlushSourceBuffers until the OnBufferEnd callback occurs (if a buffer was previously submitted) or returns with . BuffersQueued == 0. For example, if you stop a voice and call FlushSourceBuffers, it's still not legal to immediately call (which requires the voice to not have any buffers currently queued), until either of the previously mentioned conditions are met.

microsoft.directx_sdk.ixaudio2sourcevoice.ixaudio2sourcevoice.flushsourcebuffers HRESULT IXAudio2SourceVoice::FlushSourceBuffers() IXAudio2SourceVoice::FlushSourceBuffers

Notifies an XAudio2 voice that no more buffers are coming after the last one that is currently in its queue.

Returns if successful, an error code otherwise.

Discontinuity suppresses the warnings that normally occur in the debug build of XAudio2 when a voice runs out of audio buffers to play. It is preferable to mark the final buffer of a stream by tagging it with the flag, but in some cases the client may not know that a buffer is the end of a stream until after the buffer has been submitted.

Because calling Discontinuity is equivalent to applying the flag retroactively to the last buffer submitted, an OnStreamEnd callback will be made when this buffer completes.

Note??XAudio2 may consume its entire buffer queue and emit a warning before the Discontinuity call takes effect, so Discontinuity is not guaranteed to suppress the warnings.?
microsoft.directx_sdk.ixaudio2sourcevoice.ixaudio2sourcevoice.discontinuity HRESULT IXAudio2SourceVoice::Discontinuity() IXAudio2SourceVoice::Discontinuity

Stops looping the voice when it reaches the end of the current loop region.

Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

If the cursor for the voice is not in a loop region, ExitLoop does nothing.

microsoft.directx_sdk.ixaudio2sourcevoice.ixaudio2sourcevoice.exitloop HRESULT IXAudio2SourceVoice::ExitLoop([In] unsigned int OperationSet) IXAudio2SourceVoice::ExitLoop

Returns the voice's current state and cursor position data.

Number of audio buffers currently queued on the voice, including the one that is processed currently.

For all encoded formats, including constant bit rate (CBR) formats such as adaptive differential pulse code modulation (ADPCM), SamplesPlayed is expressed in terms of decoded samples. For pulse code modulation (PCM) formats, SamplesPlayed is expressed in terms of either input or output samples. There is a one-to-one mapping from input to output for PCM formats.

If a client needs to get the correlated positions of several voices?that is, to know exactly which sample of a particular voice is playing when a specified sample of another voice is playing?it must make the calls in an XAudio2 engine callback. Doing this ensures that none of the voices advance while the calls are made.

microsoft.directx_sdk.xaudio2.xaudio2_voice_state void IXAudio2SourceVoice::GetState([Out] XAUDIO2_VOICE_STATE* pVoiceState,[In] unsigned int Flags) IXAudio2SourceVoice::GetState

Sets the frequency adjustment ratio of the voice.

Frequency adjustment ratio. This value must be between and the MaxFrequencyRatio parameter specified when the voice was created (see ). currently is 0.0005, which allows pitch to be lowered by up to 11 octaves.

Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of error codes.

Frequency adjustment is expressed as source frequency / target frequency. Changing the frequency ratio changes the rate audio is played on the voice. A ratio greater than 1.0 will cause the audio to play faster and a ratio less than 1.0 will cause the audio to play slower. Additionally, the frequency ratio affects the pitch of audio on the voice. As an example, a value of 1.0 has no effect on the audio, whereas a value of 2.0 raises pitch by one octave and 0.5 lowers it by one octave.

If SetFrequencyRatio is called specifying a Ratio value outside the valid range, the method will set the frequency ratio to the nearest valid value. A warning also will be generated for debug builds.

Note?? always returns the voice's actual current frequency ratio. However, this may not match the ratio set by the most recent call: the actual ratio is only changed the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).?
microsoft.directx_sdk.ixaudio2sourcevoice.ixaudio2sourcevoice.setfrequencyratio HRESULT IXAudio2SourceVoice::SetFrequencyRatio([In] float Ratio,[In] unsigned int OperationSet) IXAudio2SourceVoice::SetFrequencyRatio

Returns the frequency adjustment ratio of the voice.

Returns the current frequency adjustment ratio if successful.

GetFrequencyRatio always returns the voice's actual current frequency ratio. However, this may not match the ratio set by the most recent call: the actual ratio is only changed the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).

For information on frequency ratios, see .

microsoft.directx_sdk.ixaudio2sourcevoice.ixaudio2sourcevoice.getfrequencyratio void IXAudio2SourceVoice::GetFrequencyRatio([Out] float* pRatio) IXAudio2SourceVoice::GetFrequencyRatio

Reconfigures the voice to consume source data at a different sample rate than the rate specified when the voice was created.

The new sample rate the voice should process submitted data at. Valid sample rates are 1kHz to 200kHz.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of error codes.

The SetSourceSampleRate method supports reuse of XAudio2 voices by allowing a voice to play sounds with a variety of sample rates. To use SetSourceSampleRate the voice must have been created without the or flags and must not have any buffers currently queued.

The typical use of SetSourceSampleRate is to support voice pooling. For example to support voice pooling an application would precreate all the voices it expects to use. Whenever a new sound will be played the application chooses an inactive voice or ,if all voices are busy, picks the least important voice and calls SetSourceSampleRate on the voice with the new sound's sample rate. After SetSourceSampleRate has been called on the voice, the application can immediately start submitting and playing buffers with the new sample rate. This allows the application to avoid the overhead of creating and destroying voices frequently during gameplay.

microsoft.directx_sdk.ixaudio2sourcevoice.ixaudio2sourcevoice.setsourcesamplerate HRESULT IXAudio2SourceVoice::SetSourceSampleRate([In] unsigned int NewSourceSampleRate) IXAudio2SourceVoice::SetSourceSampleRate
Creates and configures a source voice. an instance of [in] Pointer to a structure. This structure contains the expected format for all audio buffers submitted to the source voice. XAudio2 supports voice types of PCM, xWMA, ADPCM (Windows only), and XMA (Xbox 360 only). XAudio2 supports the following PCM formats. 8-bit (unsigned) integer PCM 16-bit integer PCM (Optimal format for XAudio2) 20-bit integer PCM (either in 24 or 32 bit containers) 24-bit integer PCM (either in 24 or 32 bit containers) 32-bit integer PCM 32-bit float PCM (Preferred format after 16-bit integer) The number of channels in a source voice must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. The sample rate of a source voice must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. Note Data formats such as XMA, {{ADPCM}}, and {{xWMA}} that require more information than provided by have a structure as the first member in their format structure. When creating a source voice with one of those formats cast the format's structure as a structure and use it as the value for pSourceFormat. No documentation. HRESULT IXAudio2::CreateSourceVoice([Out] IXAudio2SourceVoice** ppSourceVoice,[In] const WAVEFORMATEX* pSourceFormat,[None] UINT32 Flags,[None] float MaxFrequencyRatio,[In, Optional] IXAudio2VoiceCallback* pCallback,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a source voice. an instance of [in] Pointer to a structure. This structure contains the expected format for all audio buffers submitted to the source voice. XAudio2 supports voice types of PCM, xWMA, ADPCM (Windows only), and XMA (Xbox 360 only). XAudio2 supports the following PCM formats. 8-bit (unsigned) integer PCM 16-bit integer PCM (Optimal format for XAudio2) 20-bit integer PCM (either in 24 or 32 bit containers) 24-bit integer PCM (either in 24 or 32 bit containers) 32-bit integer PCM 32-bit float PCM (Preferred format after 16-bit integer) The number of channels in a source voice must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. The sample rate of a source voice must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. Note Data formats such as XMA, {{ADPCM}}, and {{xWMA}} that require more information than provided by have a structure as the first member in their format structure. When creating a source voice with one of those formats cast the format's structure as a structure and use it as the value for pSourceFormat. True to enable delegate callbacks on this instance. Default is false No documentation. HRESULT IXAudio2::CreateSourceVoice([Out] IXAudio2SourceVoice** ppSourceVoice,[In] const WAVEFORMATEX* pSourceFormat,[None] UINT32 Flags,[None] float MaxFrequencyRatio,[In, Optional] IXAudio2VoiceCallback* pCallback,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a source voice. an instance of [in] Pointer to a structure. This structure contains the expected format for all audio buffers submitted to the source voice. XAudio2 supports voice types of PCM, xWMA, ADPCM (Windows only), and XMA (Xbox 360 only). XAudio2 supports the following PCM formats. 8-bit (unsigned) integer PCM 16-bit integer PCM (Optimal format for XAudio2) 20-bit integer PCM (either in 24 or 32 bit containers) 24-bit integer PCM (either in 24 or 32 bit containers) 32-bit integer PCM 32-bit float PCM (Preferred format after 16-bit integer) The number of channels in a source voice must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. The sample rate of a source voice must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. Note Data formats such as XMA, {{ADPCM}}, and {{xWMA}} that require more information than provided by have a structure as the first member in their format structure. When creating a source voice with one of those formats cast the format's structure as a structure and use it as the value for pSourceFormat. [in] Flags that specify the behavior of the source voice. A flag can be 0 or a combination of one or more of the following: ValueDescriptionXAUDIO2_VOICE_NOPITCHNo pitch control is available on the voice.?XAUDIO2_VOICE_NOSRCNo sample rate conversion is available on the voice, the voice's outputs must have the same sample rate.Note The XAUDIO2_VOICE_NOSRC flag causes the voice to behave as though the XAUDIO2_VOICE_NOPITCH flag also is specified. ?XAUDIO2_VOICE_USEFILTERThe filter effect should be available on this voice.?XAUDIO2_VOICE_MUSICThe voice is used to play background music. The system automatically can replace the voice with music selected by the user.? No documentation. HRESULT IXAudio2::CreateSourceVoice([Out] IXAudio2SourceVoice** ppSourceVoice,[In] const WAVEFORMATEX* pSourceFormat,[None] UINT32 Flags,[None] float MaxFrequencyRatio,[In, Optional] IXAudio2VoiceCallback* pCallback,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a source voice. an instance of [in] Pointer to a structure. This structure contains the expected format for all audio buffers submitted to the source voice. XAudio2 supports voice types of PCM, xWMA, ADPCM (Windows only), and XMA (Xbox 360 only). XAudio2 supports the following PCM formats. 8-bit (unsigned) integer PCM 16-bit integer PCM (Optimal format for XAudio2) 20-bit integer PCM (either in 24 or 32 bit containers) 24-bit integer PCM (either in 24 or 32 bit containers) 32-bit integer PCM 32-bit float PCM (Preferred format after 16-bit integer) The number of channels in a source voice must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. The sample rate of a source voice must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. Note Data formats such as XMA, {{ADPCM}}, and {{xWMA}} that require more information than provided by have a structure as the first member in their format structure. When creating a source voice with one of those formats cast the format's structure as a structure and use it as the value for pSourceFormat. [in] Flags that specify the behavior of the source voice. A flag can be 0 or a combination of one or more of the following: ValueDescriptionXAUDIO2_VOICE_NOPITCHNo pitch control is available on the voice.?XAUDIO2_VOICE_NOSRCNo sample rate conversion is available on the voice, the voice's outputs must have the same sample rate.Note The XAUDIO2_VOICE_NOSRC flag causes the voice to behave as though the XAUDIO2_VOICE_NOPITCH flag also is specified. ?XAUDIO2_VOICE_USEFILTERThe filter effect should be available on this voice.?XAUDIO2_VOICE_MUSICThe voice is used to play background music. The system automatically can replace the voice with music selected by the user.? True to enable delegate callbacks on this instance. Default is false No documentation. HRESULT IXAudio2::CreateSourceVoice([Out] IXAudio2SourceVoice** ppSourceVoice,[In] const WAVEFORMATEX* pSourceFormat,[None] UINT32 Flags,[None] float MaxFrequencyRatio,[In, Optional] IXAudio2VoiceCallback* pCallback,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a source voice. an instance of [in] Pointer to a structure. This structure contains the expected format for all audio buffers submitted to the source voice. XAudio2 supports voice types of PCM, xWMA, ADPCM (Windows only), and XMA (Xbox 360 only). XAudio2 supports the following PCM formats. 8-bit (unsigned) integer PCM 16-bit integer PCM (Optimal format for XAudio2) 20-bit integer PCM (either in 24 or 32 bit containers) 24-bit integer PCM (either in 24 or 32 bit containers) 32-bit integer PCM 32-bit float PCM (Preferred format after 16-bit integer) The number of channels in a source voice must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. The sample rate of a source voice must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. Note Data formats such as XMA, {{ADPCM}}, and {{xWMA}} that require more information than provided by have a structure as the first member in their format structure. When creating a source voice with one of those formats cast the format's structure as a structure and use it as the value for pSourceFormat. [in] Flags that specify the behavior of the source voice. A flag can be 0 or a combination of one or more of the following: ValueDescriptionXAUDIO2_VOICE_NOPITCHNo pitch control is available on the voice.?XAUDIO2_VOICE_NOSRCNo sample rate conversion is available on the voice, the voice's outputs must have the same sample rate.Note The XAUDIO2_VOICE_NOSRC flag causes the voice to behave as though the XAUDIO2_VOICE_NOPITCH flag also is specified. ?XAUDIO2_VOICE_USEFILTERThe filter effect should be available on this voice.?XAUDIO2_VOICE_MUSICThe voice is used to play background music. The system automatically can replace the voice with music selected by the user.? [in] Highest allowable frequency ratio that can be set on this voice. The value for this argument must be between XAUDIO2_MIN_FREQ_RATIO and XAUDIO2_MAX_FREQ_RATIO. Subsequent calls to are clamped between XAUDIO2_MIN_FREQ_RATIO and MaxFrequencyRatio. The maximum value for this argument is defined as XAUDIO2_MAX_FREQ_RATIO, which allows pitch to be raised by up to 10 octaves. If MaxFrequencyRatio is less than 1.0, the voice will use that ratio immediately after being created (rather than the default of 1.0). Xbox 360 For XMA voices there is an additional restriction on the MaxFrequencyRatio argument and the voice's sample rate. The product of these two numbers cannot exceed XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MONO for one-channel voices or XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MULTICHANNEL for voices with any other number of channels. If the value specified for MaxFrequencyRatio is too high for the specified format, the call to CreateSourceVoice fails and produces a debug message. Note XAudio2's memory usage can be reduced by using the lowest possible MaxFrequencyRatio value. No documentation. HRESULT IXAudio2::CreateSourceVoice([Out] IXAudio2SourceVoice** ppSourceVoice,[In] const WAVEFORMATEX* pSourceFormat,[None] UINT32 Flags,[None] float MaxFrequencyRatio,[In, Optional] IXAudio2VoiceCallback* pCallback,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a source voice. an instance of [in] Pointer to a structure. This structure contains the expected format for all audio buffers submitted to the source voice. XAudio2 supports voice types of PCM, xWMA, ADPCM (Windows only), and XMA (Xbox 360 only). XAudio2 supports the following PCM formats. 8-bit (unsigned) integer PCM 16-bit integer PCM (Optimal format for XAudio2) 20-bit integer PCM (either in 24 or 32 bit containers) 24-bit integer PCM (either in 24 or 32 bit containers) 32-bit integer PCM 32-bit float PCM (Preferred format after 16-bit integer) The number of channels in a source voice must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. The sample rate of a source voice must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. Note Data formats such as XMA, {{ADPCM}}, and {{xWMA}} that require more information than provided by have a structure as the first member in their format structure. When creating a source voice with one of those formats cast the format's structure as a structure and use it as the value for pSourceFormat. [in] Flags that specify the behavior of the source voice. A flag can be 0 or a combination of one or more of the following: ValueDescriptionXAUDIO2_VOICE_NOPITCHNo pitch control is available on the voice.?XAUDIO2_VOICE_NOSRCNo sample rate conversion is available on the voice, the voice's outputs must have the same sample rate.Note The XAUDIO2_VOICE_NOSRC flag causes the voice to behave as though the XAUDIO2_VOICE_NOPITCH flag also is specified. ?XAUDIO2_VOICE_USEFILTERThe filter effect should be available on this voice.?XAUDIO2_VOICE_MUSICThe voice is used to play background music. The system automatically can replace the voice with music selected by the user.? [in] Highest allowable frequency ratio that can be set on this voice. The value for this argument must be between XAUDIO2_MIN_FREQ_RATIO and XAUDIO2_MAX_FREQ_RATIO. Subsequent calls to are clamped between XAUDIO2_MIN_FREQ_RATIO and MaxFrequencyRatio. The maximum value for this argument is defined as XAUDIO2_MAX_FREQ_RATIO, which allows pitch to be raised by up to 10 octaves. If MaxFrequencyRatio is less than 1.0, the voice will use that ratio immediately after being created (rather than the default of 1.0). Xbox 360 For XMA voices there is an additional restriction on the MaxFrequencyRatio argument and the voice's sample rate. The product of these two numbers cannot exceed XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MONO for one-channel voices or XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MULTICHANNEL for voices with any other number of channels. If the value specified for MaxFrequencyRatio is too high for the specified format, the call to CreateSourceVoice fails and produces a debug message. Note XAudio2's memory usage can be reduced by using the lowest possible MaxFrequencyRatio value. [in, optional] Pointer to a client-provided callback interface, . No documentation. HRESULT IXAudio2::CreateSourceVoice([Out] IXAudio2SourceVoice** ppSourceVoice,[In] const WAVEFORMATEX* pSourceFormat,[None] UINT32 Flags,[None] float MaxFrequencyRatio,[In, Optional] IXAudio2VoiceCallback* pCallback,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a source voice with callback through delegates. an instance of [in] Pointer to a structure. This structure contains the expected format for all audio buffers submitted to the source voice. XAudio2 supports voice types of PCM, xWMA, ADPCM (Windows only), and XMA (Xbox 360 only). XAudio2 supports the following PCM formats. 8-bit (unsigned) integer PCM 16-bit integer PCM (Optimal format for XAudio2) 20-bit integer PCM (either in 24 or 32 bit containers) 24-bit integer PCM (either in 24 or 32 bit containers) 32-bit integer PCM 32-bit float PCM (Preferred format after 16-bit integer) The number of channels in a source voice must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. The sample rate of a source voice must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. Note Data formats such as XMA, {{ADPCM}}, and {{xWMA}} that require more information than provided by have a structure as the first member in their format structure. When creating a source voice with one of those formats cast the format's structure as a structure and use it as the value for pSourceFormat. [in] Flags that specify the behavior of the source voice. A flag can be 0 or a combination of one or more of the following: ValueDescriptionXAUDIO2_VOICE_NOPITCHNo pitch control is available on the voice.?XAUDIO2_VOICE_NOSRCNo sample rate conversion is available on the voice, the voice's outputs must have the same sample rate.Note The XAUDIO2_VOICE_NOSRC flag causes the voice to behave as though the XAUDIO2_VOICE_NOPITCH flag also is specified. ?XAUDIO2_VOICE_USEFILTERThe filter effect should be available on this voice.?XAUDIO2_VOICE_MUSICThe voice is used to play background music. The system automatically can replace the voice with music selected by the user.? [in] Highest allowable frequency ratio that can be set on this voice. The value for this argument must be between XAUDIO2_MIN_FREQ_RATIO and XAUDIO2_MAX_FREQ_RATIO. Subsequent calls to are clamped between XAUDIO2_MIN_FREQ_RATIO and MaxFrequencyRatio. The maximum value for this argument is defined as XAUDIO2_MAX_FREQ_RATIO, which allows pitch to be raised by up to 10 octaves. If MaxFrequencyRatio is less than 1.0, the voice will use that ratio immediately after being created (rather than the default of 1.0). Xbox 360 For XMA voices there is an additional restriction on the MaxFrequencyRatio argument and the voice's sample rate. The product of these two numbers cannot exceed XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MONO for one-channel voices or XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MULTICHANNEL for voices with any other number of channels. If the value specified for MaxFrequencyRatio is too high for the specified format, the call to CreateSourceVoice fails and produces a debug message. Note XAudio2's memory usage can be reduced by using the lowest possible MaxFrequencyRatio value. if set to true [enable callback events]. No enableCallbackEvents. HRESULT IXAudio2::CreateSourceVoice([Out] IXAudio2SourceVoice** ppSourceVoice,[In] const WAVEFORMATEX* pSourceFormat,[None] UINT32 Flags,[None] float MaxFrequencyRatio,[In, Optional] IXAudio2VoiceCallback* pCallback,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a source voice. an instance of [in] Pointer to a structure. This structure contains the expected format for all audio buffers submitted to the source voice. XAudio2 supports voice types of PCM, xWMA, ADPCM (Windows only), and XMA (Xbox 360 only). XAudio2 supports the following PCM formats. 8-bit (unsigned) integer PCM 16-bit integer PCM (Optimal format for XAudio2) 20-bit integer PCM (either in 24 or 32 bit containers) 24-bit integer PCM (either in 24 or 32 bit containers) 32-bit integer PCM 32-bit float PCM (Preferred format after 16-bit integer) The number of channels in a source voice must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. The sample rate of a source voice must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. Note Data formats such as XMA, {{ADPCM}}, and {{xWMA}} that require more information than provided by have a structure as the first member in their format structure. When creating a source voice with one of those formats cast the format's structure as a structure and use it as the value for pSourceFormat. [in] Flags that specify the behavior of the source voice. A flag can be 0 or a combination of one or more of the following: ValueDescriptionXAUDIO2_VOICE_NOPITCHNo pitch control is available on the voice.?XAUDIO2_VOICE_NOSRCNo sample rate conversion is available on the voice, the voice's outputs must have the same sample rate.Note The XAUDIO2_VOICE_NOSRC flag causes the voice to behave as though the XAUDIO2_VOICE_NOPITCH flag also is specified. ?XAUDIO2_VOICE_USEFILTERThe filter effect should be available on this voice.?XAUDIO2_VOICE_MUSICThe voice is used to play background music. The system automatically can replace the voice with music selected by the user.? [in] Highest allowable frequency ratio that can be set on this voice. The value for this argument must be between XAUDIO2_MIN_FREQ_RATIO and XAUDIO2_MAX_FREQ_RATIO. Subsequent calls to are clamped between XAUDIO2_MIN_FREQ_RATIO and MaxFrequencyRatio. The maximum value for this argument is defined as XAUDIO2_MAX_FREQ_RATIO, which allows pitch to be raised by up to 10 octaves. If MaxFrequencyRatio is less than 1.0, the voice will use that ratio immediately after being created (rather than the default of 1.0). Xbox 360 For XMA voices there is an additional restriction on the MaxFrequencyRatio argument and the voice's sample rate. The product of these two numbers cannot exceed XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MONO for one-channel voices or XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MULTICHANNEL for voices with any other number of channels. If the value specified for MaxFrequencyRatio is too high for the specified format, the call to CreateSourceVoice fails and produces a debug message. Note XAudio2's memory usage can be reduced by using the lowest possible MaxFrequencyRatio value. [in, optional] Pointer to a client-provided callback interface, . [in, optional] Pointer to a list of XAUDIO2_EFFECT_CHAIN structures that describe an effect chain to use in the source voice. No documentation. HRESULT IXAudio2::CreateSourceVoice([Out] IXAudio2SourceVoice** ppSourceVoice,[In] const WAVEFORMATEX* pSourceFormat,[None] UINT32 Flags,[None] float MaxFrequencyRatio,[In, Optional] IXAudio2VoiceCallback* pCallback,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a source voice with callback through delegates. an instance of [in] Pointer to a structure. This structure contains the expected format for all audio buffers submitted to the source voice. XAudio2 supports voice types of PCM, xWMA, ADPCM (Windows only), and XMA (Xbox 360 only). XAudio2 supports the following PCM formats. 8-bit (unsigned) integer PCM 16-bit integer PCM (Optimal format for XAudio2) 20-bit integer PCM (either in 24 or 32 bit containers) 24-bit integer PCM (either in 24 or 32 bit containers) 32-bit integer PCM 32-bit float PCM (Preferred format after 16-bit integer) The number of channels in a source voice must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. The sample rate of a source voice must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. Note Data formats such as XMA, {{ADPCM}}, and {{xWMA}} that require more information than provided by have a structure as the first member in their format structure. When creating a source voice with one of those formats cast the format's structure as a structure and use it as the value for pSourceFormat. [in] Flags that specify the behavior of the source voice. A flag can be 0 or a combination of one or more of the following: ValueDescriptionXAUDIO2_VOICE_NOPITCHNo pitch control is available on the voice.?XAUDIO2_VOICE_NOSRCNo sample rate conversion is available on the voice, the voice's outputs must have the same sample rate.Note The XAUDIO2_VOICE_NOSRC flag causes the voice to behave as though the XAUDIO2_VOICE_NOPITCH flag also is specified. ?XAUDIO2_VOICE_USEFILTERThe filter effect should be available on this voice.?XAUDIO2_VOICE_MUSICThe voice is used to play background music. The system automatically can replace the voice with music selected by the user.? [in] Highest allowable frequency ratio that can be set on this voice. The value for this argument must be between XAUDIO2_MIN_FREQ_RATIO and XAUDIO2_MAX_FREQ_RATIO. Subsequent calls to are clamped between XAUDIO2_MIN_FREQ_RATIO and MaxFrequencyRatio. The maximum value for this argument is defined as XAUDIO2_MAX_FREQ_RATIO, which allows pitch to be raised by up to 10 octaves. If MaxFrequencyRatio is less than 1.0, the voice will use that ratio immediately after being created (rather than the default of 1.0). Xbox 360 For XMA voices there is an additional restriction on the MaxFrequencyRatio argument and the voice's sample rate. The product of these two numbers cannot exceed XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MONO for one-channel voices or XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MULTICHANNEL for voices with any other number of channels. If the value specified for MaxFrequencyRatio is too high for the specified format, the call to CreateSourceVoice fails and produces a debug message. Note XAudio2's memory usage can be reduced by using the lowest possible MaxFrequencyRatio value. if set to true [enable callback events]. [in, optional] Pointer to a list of XAUDIO2_EFFECT_CHAIN structures that describe an effect chain to use in the source voice. No enableCallbackEvents. HRESULT IXAudio2::CreateSourceVoice([Out] IXAudio2SourceVoice** ppSourceVoice,[In] const WAVEFORMATEX* pSourceFormat,[None] UINT32 Flags,[None] float MaxFrequencyRatio,[In, Optional] IXAudio2VoiceCallback* pCallback,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Starts consumption and processing of audio by the voice. Delivers the result to any connected submix or mastering voices, or to the output device, with CommitNow changes. No documentation. HRESULT IXAudio2SourceVoice::Start([None] UINT32 Flags,[None] UINT32 OperationSet) Gets the state. Sets the frequency ratio. The ratio. Starts consumption and processing of audio by the voice. Delivers the result to any connected submix or mastering voices, or to the output device. [in] Identifies this call as part of a deferred batch. See the {{XAudio2 Operation Sets}} overview for more information. No documentation. HRESULT IXAudio2SourceVoice::Start([None] UINT32 Flags,[None] UINT32 OperationSet) No documentation. No documentation. No documentation. No documentation. HRESULT IXAudio2SourceVoice::SubmitSourceBuffer([In] const XAUDIO2_BUFFER* pBuffer,[In, Optional] const XAUDIO2_BUFFER_WMA* pBufferWMA) Occurs just before the processing pass for the voice begins. In order to use this delegate, this instance must have been initialized with events delegate support. Occurs just after the processing pass for the voice ends. In order to use this delegate, this instance must have been initialized with events delegate support. Occurs when the voice has just finished playing a contiguous audio stream. In order to use this delegate, this instance must have been initialized with events delegate support. Occurs when the voice is about to start processing a new audio buffer. In order to use this delegate, this instance must have been initialized with events delegate support. Occurs when the voice finishes processing a buffer. In order to use this delegate, this instance must have been initialized with events delegate support. Occurs when a critical error occurs during voice processing. In order to use this delegate, this instance must have been initialized with events delegate support. Occurs when [voice error]. In order to use this delegate, this instance must have been initialized with events delegate support.

A submix voice is used primarily for performance improvements and effects processing.

Data buffers cannot be submitted directly to submix voices and will not be audible unless submitted to a mastering voice. A submix voice can be used to ensure that a particular set of voice data is converted to the same format and/or to have a particular effect chain processed on the collective result.

inherits directly from , but does not implement methods specific to submix voices. The interface type exists solely because some of the base class methods are implemented differently for submix voices. Having a separate type for these voices helps client code to distinguish the different voice types and to benefit from C++ type safety.

microsoft.directx_sdk.ixaudio2submixvoice.ixaudio2submixvoice IXAudio2SubmixVoice IXAudio2SubmixVoice
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. Creates and configures a submix voice on the default audio device, with stereo channels at 44100Hz. an instance of HRESULT IXAudio2::CreateSubmixVoice([Out] IXAudio2SubmixVoice** ppSubmixVoice,[None] UINT32 InputChannels,[None] UINT32 InputSampleRate,[None] UINT32 Flags,[None] UINT32 DeviceIndex,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a submix voice on the default audio device and 44100Hz. an instance of [in] Number of channels the mastering voice expects in its input audio. InputChannels must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. InputChannels can be set to XAUDIO2_DEFAULT_CHANNELS, with the default being determined by the current platform. Windows Attempts to detect the system speaker configuration setup. Xbox 360 Defaults to 5.1 surround. HRESULT IXAudio2::CreateSubmixVoice([Out] IXAudio2SubmixVoice** ppSubmixVoice,[None] UINT32 InputChannels,[None] UINT32 InputSampleRate,[None] UINT32 Flags,[None] UINT32 DeviceIndex,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a submix voice on the default audio device. an instance of [in] Number of channels the mastering voice expects in its input audio. InputChannels must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. InputChannels can be set to XAUDIO2_DEFAULT_CHANNELS, with the default being determined by the current platform. Windows Attempts to detect the system speaker configuration setup. Xbox 360 Defaults to 5.1 surround. [in] Sample rate of the input audio data of the mastering voice. This rate must be a multiple of XAUDIO2_QUANTUM_DENOMINATOR. InputSampleRate must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. InputSampleRate can be set to XAUDIO2_DEFAULT_SAMPLERATE, with the default being determined by the current platform. Windows Windows XP defaults to 44100. Windows Vista and Windows 7 default to the setting specified in the Sound Control Panel. The default for this setting is 44100 (or 48000 if required by the driver). Xbox 360 Defaults to 48000. HRESULT IXAudio2::CreateSubmixVoice([Out] IXAudio2SubmixVoice** ppSubmixVoice,[None] UINT32 InputChannels,[None] UINT32 InputSampleRate,[None] UINT32 Flags,[None] UINT32 DeviceIndex,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a submix voice. an instance of [in] Number of channels in the input audio data of the submix voice. InputChannels must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. [in] Sample rate of the input audio data of submix voice. This rate must be a multiple of XAUDIO2_QUANTUM_DENOMINATOR. InputSampleRate must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. [in] Flags that specify the behavior of the submix voice. Can be 0 or the following: ValueDescriptionXAUDIO2_VOICE_USEFILTERThe filter effect should be available on this voice.? [in] An arbitrary number that specifies when this voice is processed with respect to other submix voices, if the XAudio2 engine is running other submix voices. The voice is processed after all other voices that include a smaller ProcessingStage value, and before all other voices that include a larger ProcessingStage value. Voices that include the same ProcessingStage value are processed in any order. A submix voice cannot send to another submix voice with a lower or equal ProcessingStage value; this prevents audio being lost due to a submix cycle. No documentation. HRESULT IXAudio2::CreateSubmixVoice([Out] IXAudio2SubmixVoice** ppSubmixVoice,[None] UINT32 InputChannels,[None] UINT32 InputSampleRate,[None] UINT32 Flags,[None] UINT32 ProcessingStage,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Creates and configures a submix voice with an effect chain. an instance of [in] Number of channels in the input audio data of the submix voice. InputChannels must be less than or equal to XAUDIO2_MAX_AUDIO_CHANNELS. [in] Sample rate of the input audio data of submix voice. This rate must be a multiple of XAUDIO2_QUANTUM_DENOMINATOR. InputSampleRate must be between XAUDIO2_MIN_SAMPLE_RATE and XAUDIO2_MAX_SAMPLE_RATE. [in] Flags that specify the behavior of the submix voice. Can be 0 or the following: ValueDescriptionXAUDIO2_VOICE_USEFILTERThe filter effect should be available on this voice.? [in] An arbitrary number that specifies when this voice is processed with respect to other submix voices, if the XAudio2 engine is running other submix voices. The voice is processed after all other voices that include a smaller ProcessingStage value, and before all other voices that include a larger ProcessingStage value. Voices that include the same ProcessingStage value are processed in any order. A submix voice cannot send to another submix voice with a lower or equal ProcessingStage value; this prevents audio being lost due to a submix cycle. [in, optional] Pointer to a list of XAUDIO2_EFFECT_CHAIN structures that describe an effect chain to use in the submix voice. No documentation. HRESULT IXAudio2::CreateSubmixVoice([Out] IXAudio2SubmixVoice** ppSubmixVoice,[None] UINT32 InputChannels,[None] UINT32 InputSampleRate,[None] UINT32 Flags,[None] UINT32 ProcessingStage,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain)

represents the base interface from which , and are derived. The methods listed below are common to all voice subclasses.

  • Methods
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice IXAudio2Voice IXAudio2Voice
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

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

This method is only valid for source and submix voices. Mastering voices can not send audio to another voice.

After calling SetOutputVoices a voice's current send levels will be replaced by a default send matrix. The method must be called to set a custom matrix for the new sendlist.

It is invalid to call SetOutputVoices from within a callback (that is, or ). If SetOutputVoices is called within a callback, it returns .

Note??Calling SetOutputVoices invalidates any send matrices previously set with .?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.setoutputvoices SetOutputVoices SetOutputVoices HRESULT IXAudio2Voice::SetOutputVoices([In, Optional] const XAUDIO2_VOICE_SENDS* pSendList)

Gets the voice's filter parameters.

GetFilterParameters will fail if the voice was not created with the flag.

GetFilterParameters always returns this voice's actual current filter parameters. However, these may not match the parameters set by the most recent call: the actual parameters are only changed the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).

Note??GetFilterParameters is usable only on source and submix voices and has no effect on mastering voices.?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.getfilterparameters GetFilterParameters GetFilterParameters void IXAudio2Voice::GetFilterParameters([Out] XAUDIO2_FILTER_PARAMETERS* pParameters)

Sets the overall volume level for the voice.

SetVolume controls a voice's master input volume level. 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 - and (-2?? to 2??), 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. See XAudio2 Volume and Pitch Control for additional information on volume control.

Note?? always returns the volume most recently set by . However, it may not actually be in effect yet: it only takes effect the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.setvolume GetVolume GetVolume void IXAudio2Voice::GetVolume([Out] float* pVolume)

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

structure containing information about the voice.

microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.getvoicedetails void IXAudio2Voice::GetVoiceDetails([Out] XAUDIO2_VOICE_DETAILS* pVoiceDetails) IXAudio2Voice::GetVoiceDetails

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

Array of structure references to destination voices. If pSendList is null, the voice will send its output to the current mastering voice. To set the voice to not send its output anywhere set the OutputCount member of to 0. All of the voices in a send list must have the same input sample rate, see XAudio2 Sample Rate Conversions for additional information.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

This method is only valid for source and submix voices. Mastering voices can not send audio to another voice.

After calling SetOutputVoices a voice's current send levels will be replaced by a default send matrix. The method must be called to set a custom matrix for the new sendlist.

It is invalid to call SetOutputVoices from within a callback (that is, or ). If SetOutputVoices is called within a callback, it returns .

Note??Calling SetOutputVoices invalidates any send matrices previously set with .?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.setoutputvoices HRESULT IXAudio2Voice::SetOutputVoices([In, Optional] const XAUDIO2_VOICE_SENDS* pSendList) IXAudio2Voice::SetOutputVoices

Replaces the effect chain of the voice.

Pointer to an structure that describes the new effect chain to use. If null is passed, the current effect chain is removed.

Note??If pEffectChain is non-null, the structure that it points to must specify at least one effect. ?

Returns if successful; otherwise, an error code.

See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

The number of output channels allowed for a voice's effect chain is locked at creation of the voice. If you create the voice with an effect chain, any new effect chain passed to SetEffectChain must have the same number of input and output channels as the original effect chain. If you create the voice without an effect chain, the number of output channels allowed for the effect chain will default to the number of input channels for the voice. If any part of effect chain creation fails, none of it is applied.

After you attach an effect to an XAudio2 voice, XAudio2 takes control of the effect, and the client should not make any further calls to it. The simplest way to ensure this is to release all references to the effect.

It is invalid to call SetEffectChain from within a callback (that is, or ). If you call SetEffectChain within a callback, it returns .

The that is passed in as the pEffectChain argument and any information contained within it are no longer needed after SetEffectChain successfully completes, and may be deleted immediately after SetEffectChain is called.

microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.seteffectchain HRESULT IXAudio2Voice::SetEffectChain([In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) IXAudio2Voice::SetEffectChain

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

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

Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information.

Returns if successful; otherwise, an error code. See XAudio2 Error Codes for descriptions of error codes.

Be careful when you enable an effect while the voice that hosts it is running. Such an action can result in a problem if the effect significantly changes the audio's pitch or volume.

The effects in a given XAudio2 voice's effect chain must consume and produce audio at that voice's processing sample rate. The only aspect of the audio format they can change is the channel count. For example a reverb effect can convert mono data to 5.1. The client can use the structure's OutputChannels field to specify the number of channels it wants each effect to produce. Each effect in an effect chain must produce a number of channels that the next effect can consume. Any calls to or that would make the effect chain stop fulfilling these requirements will fail.

EnableEffect takes effect immediately when you call it from an XAudio2 callback with an OperationSet of .

microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.enableeffect HRESULT IXAudio2Voice::EnableEffect([In] unsigned int EffectIndex,[In] unsigned int OperationSet) IXAudio2Voice::EnableEffect

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

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

Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information.

Returns if successful; otherwise, an error code. See XAudio2 Error Codes for descriptions of valid error codes.

The effects in a given XAudio2 voice's effect chain must consume and produce audio at that voice's processing sample rate. The only aspect of the audio format they can change is the channel count. For example a reverb effect can convert mono data to 5.1. The client can use the structure's OutputChannels field to specify the number of channels it wants each effect to produce. Each effect in an effect chain must produce a number of channels that the next effect can consume. Any calls to or that would make the effect chain stop fulfilling these requirements will fail.

Disabling an effect immediately removes it from the processing graph. Any pending audio in the effect?such as a reverb tail?is not played. Be careful disabling an effect while the voice that hosts it is running. This can result in an audible artifact if the effect significantly changes the audio's pitch or volume.

DisableEffect takes effect immediately when called from an XAudio2 callback with an OperationSet of .

microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.disableeffect HRESULT IXAudio2Voice::DisableEffect([In] unsigned int EffectIndex,[In] unsigned int OperationSet) IXAudio2Voice::DisableEffect

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

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

GetEffectState always returns the effect's actual current state. However, this may not be the state set by the most recent or call: the actual state is only changed the next time the audio engine runs after the or call (or after the corresponding call, if EnableEffect/DisableEffect was called with a deferred operation ID).

microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.geteffectstate void IXAudio2Voice::GetEffectState([In] unsigned int EffectIndex,[Out] BOOL* pEnabled) IXAudio2Voice::GetEffectState

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

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

Returns the current values of the effect-specific parameters.

Size of the pParameters array in bytes.

Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information.

Returns if successful; otherwise, an error code. See XAudio2 Error Codes for descriptions of error codes.

Fails with E_NOTIMPL if the effect does not support a generic parameter control interface.

The specific effect being used determines the valid size and format of the pParameters buffer. The call will fail if pParameters is invalid or if ParametersByteSize is not exactly the size that the effect expects. The client must take care to direct the SetEffectParameters call to the right effect. If this call is directed to a different effect that happens to accept the same parameter block size, the parameters will be interpreted differently. This may lead to unexpected results.

The memory pointed to by pParameters must not be freed immediately, because XAudio2 will need to refer to it later when the parameters actually are applied to the effect. This happens during the next audio processing pass if the OperationSet argument is . Otherwise, the parameters are applied to the effect later, during the first processing pass after the function is called with the same OperationSet argument.

SetEffectParameters takes effect immediately when called from an XAudio2 callback with an OperationSet of .

Note?? always returns the effect's actual current parameters. However, these may not match the parameters set by the most recent call to . The actual parameters are only changed the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.seteffectparameters HRESULT IXAudio2Voice::SetEffectParameters([In] unsigned int EffectIndex,[In, Buffer] const void* pParameters,[In] unsigned int ParametersByteSize,[In] unsigned int OperationSet) IXAudio2Voice::SetEffectParameters

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

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

Returns the current values of the effect-specific parameters.

Size, in bytes, of the pParameters array.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of error codes.

Fails with E_NOTIMPL if the effect does not support a generic parameter control interface.

GetEffectParameters always returns the effect's actual current parameters. However, these may not match the parameters set by the most recent call to : the actual parameters are only changed the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).

microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.geteffectparameters HRESULT IXAudio2Voice::GetEffectParameters([In] unsigned int EffectIndex,[Out, Buffer] void* pParameters,[In] unsigned int ParametersByteSize) IXAudio2Voice::GetEffectParameters

Sets the voice's filter parameters.

Pointer to an structure containing the filter information.

Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of error codes.

SetFilterParameters will fail if the voice was not created with the flag.

This method is usable only on source and submix voices and has no effect on mastering voices.

Note?? always returns this voice's actual current filter parameters. However, these may not match the parameters set by the most recent call: the actual parameters are only changed the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.setfilterparameters HRESULT IXAudio2Voice::SetFilterParameters([In] const XAUDIO2_FILTER_PARAMETERS* pParameters,[In] unsigned int OperationSet) IXAudio2Voice::SetFilterParameters

Gets the voice's filter parameters.

Pointer to an structure containing the filter information.

GetFilterParameters will fail if the voice was not created with the flag.

GetFilterParameters always returns this voice's actual current filter parameters. However, these may not match the parameters set by the most recent call: the actual parameters are only changed the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).

Note??GetFilterParameters is usable only on source and submix voices and has no effect on mastering voices.?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.getfilterparameters void IXAudio2Voice::GetFilterParameters([Out] XAUDIO2_FILTER_PARAMETERS* pParameters) IXAudio2Voice::GetFilterParameters

Sets the filter parameters on one of this voice's sends.

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

Pointer to an structure containing the filter information.

Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of error codes.

SetOutputFilterParameters will fail if the send was not created with the flag. This method is usable only on sends belonging to source and submix voices and has no effect on a mastering voice's sends.

Note?? always returns this send?s actual current filter parameters. However, these may not match the parameters set by the most recent call: the actual parameters are only changed the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.setoutputfilterparameters HRESULT IXAudio2Voice::SetOutputFilterParameters([In, Optional] IXAudio2Voice* pDestinationVoice,[In] const XAUDIO2_FILTER_PARAMETERS* pParameters,[In] unsigned int OperationSet) IXAudio2Voice::SetOutputFilterParameters

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

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

Pointer to an structure containing the filter information.

GetOutputFilterParameters will fail if the send was not created with the flag. This method is usable only on sends belonging to source and submix voices and has no effect on mastering voices? sends.

Note?? always returns this send?s actual current filter parameters. However, these may not match the parameters set by the most recent call: the actual parameters are only changed the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.getoutputfilterparameters void IXAudio2Voice::GetOutputFilterParameters([In, Optional] IXAudio2Voice* pDestinationVoice,[Out] XAUDIO2_FILTER_PARAMETERS* pParameters) IXAudio2Voice::GetOutputFilterParameters

Sets the overall volume level for the voice.

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

Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of error codes.

SetVolume controls a voice's master input volume level. 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 - and (-2?? to 2??), 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. See XAudio2 Volume and Pitch Control for additional information on volume control.

Note?? always returns the volume most recently set by . However, it may not actually be in effect yet: it only takes effect the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.setvolume HRESULT IXAudio2Voice::SetVolume([In] float Volume,[In] unsigned int OperationSet) IXAudio2Voice::SetVolume

Sets the overall volume level for the voice.

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

SetVolume controls a voice's master input volume level. 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 - and (-2?? to 2??), 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. See XAudio2 Volume and Pitch Control for additional information on volume control.

Note?? always returns the volume most recently set by . However, it may not actually be in effect yet: it only takes effect the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.setvolume void IXAudio2Voice::GetVolume([Out] float* pVolume) IXAudio2Voice::GetVolume

Sets the volume levels for the voice, per channel.

Number of channels in the voice.

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

Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

SetChannelVolumes controls a voice's per-channel output levels and is applied just after the voice's final SRC and before its sends.

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

Volume levels are expressed as floating-point amplitude multipliers between - and (-2?? to 2??), with a maximum gain of 144.5 dB. A volume of 1 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase. See XAudio2 Volume and Pitch Control for additional information on volume control.

Note?? always returns the volume levels most recently set by . However, those values may not actually be in effect yet: they only take effect the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.setchannelvolumes HRESULT IXAudio2Voice::SetChannelVolumes([In] unsigned int Channels,[In, Buffer] const float* pVolumes,[In] unsigned int OperationSet) IXAudio2Voice::SetChannelVolumes

Returns the volume levels for the voice, per channel.

Confirms the channel count of the voice.

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

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.

Volume levels are expressed as floating-point amplitude multipliers between -2?? to 2??, with a maximum gain of 144.5 dB. A volume of 1 means there is no attenuation or gain, 0 means silence, and negative levels can be used to invert the audio's phase. See XAudio2 Volume and Pitch Control for additional information on volume control.

Note??GetChannelVolumes always returns the volume levels most recently set by . However, those values may not actually be in effect yet: they only take effect the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.getchannelvolumes void IXAudio2Voice::GetChannelVolumes([In] unsigned int Channels,[Out, Buffer] float* pVolumes) IXAudio2Voice::GetChannelVolumes

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.

Pointer to a destination for which to set volume levels.

Note??If the voice sends to a single target voice then specifying null will cause SetOutputMatrix to operate on that target voice. ?

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

Confirms the input channel count of the destination voice.

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 pLevelMatrix[SourceChannels ? D + S].

For example, when rendering two-channel stereo input into 5.1 output that is weighted toward the front channels?but is absent from the center and low-frequency channels?the matrix might have the values shown in the following table.

OutputLeft Input [Array Index]Right Input [Array Index]
Left1.0 [0]0.0 [1]
Right0.0 [2]1.0 [3]
Front Center0.0 [4]0.0 [5]
LFE0.0 [6]0.0 [7]
Rear Left0.8 [8]0.0 [9]
Rear Right0.0 [10]0.8 [11]

?

Note??The left and right input are fully mapped to the output left and right channels; 80 percent of the left and right input is mapped to the rear left and right channels. ?

See Remarks for more information on volume levels.

Identifies this call as part of a deferred batch. See the XAudio2 Operation Sets overview for more information.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of error codes.

This method is valid only for source and submix voices, because mastering voices write directly to the device with no matrix mixing.

Volume levels are expressed as floating-point amplitude multipliers between - and (-2?? to 2??), 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. See XAudio2 Volume and Pitch Control for additional information on volume control.

The X3DAudio function X3DAudioCalculate can produce an output matrix for use with SetOutputMatrix based on a sound's position and a listener's position.

Note?? always returns the levels most recently set by . However, they may not actually be in effect yet: they only take effect the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.setoutputmatrix HRESULT IXAudio2Voice::SetOutputMatrix([In, Optional] IXAudio2Voice* pDestinationVoice,[In] unsigned int SourceChannels,[In] unsigned int DestinationChannels,[In, Buffer] const float* pLevelMatrix,[In] unsigned int OperationSet) IXAudio2Voice::SetOutputMatrix

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.

Pointer specifying the destination to retrieve the output matrix for.

Note??If the voice sends to a single target voice then specifying null will cause GetOutputMatrix to operate on that target voice. ?

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

Confirms the input channel count of the destination voice.

Array of [SourceChannels * DestinationChannels] volume levels sent to the destination voice. The level sent from source channel S to destination channel D is returned in the form pLevelMatrix[DestinationChannels ? S + D]. See Remarks for more information on volume levels.

This method applies only to source and submix voices, because mastering voices write directly to the device with no matrix mixing. Volume levels are expressed as floating-point amplitude multipliers between -2?? to 2??, with a maximum gain of 144.5 dB. A volume level of 1 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase. See XAudio2 Volume and Pitch Control for additional information on volume control.

See for information on standard channel ordering.

Note??GetOutputMatrix always returns the levels most recently set by . However, they may not actually be in effect yet: they only take effect the next time the audio engine runs after the call (or after the corresponding call, if was called with a deferred operation ID).?
microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.getoutputmatrix void IXAudio2Voice::GetOutputMatrix([In, Optional] IXAudio2Voice* pDestinationVoice,[In] unsigned int SourceChannels,[In] unsigned int DestinationChannels,[Out, Buffer] float* pLevelMatrix) IXAudio2Voice::GetOutputMatrix

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

If any other voice is currently sending audio to this voice, the method fails.

DestroyVoice waits for the audio processing thread to be idle, so it can take a little while (typically no more than a couple of milliseconds). This is necessary to guarantee that the voice will no longer make any callbacks or read any audio data, so the application can safely free up these resources as soon as the call returns.

To avoid title thread interruptions from a blocking DestroyVoice call, the application can destroy voices on a separate non-critical thread, or the application can use voice pooling strategies to reuse voices rather than destroying them. Note that voices can only be reused with audio that has the same data format and the same number of channels the voice was created with. A voice can play audio data with different sample rates than that of the voice by calling with an appropriate ratio parameter.

It is invalid to call DestroyVoice from within a callback (that is, or ).

microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.destroyvoice void IXAudio2Voice::DestroyVoice() IXAudio2Voice::DestroyVoice

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

microsoft.directx_sdk.ixaudio2voice.ixaudio2voice.getvoicedetails GetVoiceDetails GetVoiceDetails void IXAudio2Voice::GetVoiceDetails([Out] XAUDIO2_VOICE_DETAILS* pVoiceDetails)
Enables the effect at a given position in the effect chain of the voice. [in] Zero-based index of an effect in the effect chain of the voice. No documentation. HRESULT IXAudio2Voice::EnableEffect([None] UINT32 EffectIndex,[None] UINT32 OperationSet) Disables the effect at a given position in the effect chain of the voice. [in] Zero-based index of an effect in the effect chain of the voice. No documentation. HRESULT IXAudio2Voice::DisableEffect([None] UINT32 EffectIndex,[None] UINT32 OperationSet) Sets parameters for a given effect in the voice's effect chain. [in] Zero-based index of an effect within the voice's effect chain. Returns the current values of the effect-specific parameters. HRESULT IXAudio2Voice::SetEffectParameters([None] UINT32 EffectIndex,[In, Buffer] const void* pParameters,[None] UINT32 ParametersByteSize,[None] UINT32 OperationSet) Returns the current effect-specific parameters of a given effect in the voice's effect chain. [in] Zero-based index of an effect within the voice's effect chain. [out] Returns the current values of the effect-specific parameters. No documentation. HRESULT IXAudio2Voice::GetEffectParameters([None] UINT32 EffectIndex,[Out, Buffer] void* pParameters,[None] UINT32 ParametersByteSize) Sets parameters for a given effect in the voice's effect chain. [in] Zero-based index of an effect within the voice's effect chain. [in] Returns the current values of the effect-specific parameters. No documentation. HRESULT IXAudio2Voice::SetEffectParameters([None] UINT32 EffectIndex,[In, Buffer] const void* pParameters,[None] UINT32 ParametersByteSize,[None] UINT32 OperationSet) Sets parameters for a given effect in the voice's effect chain. [in] Zero-based index of an effect within the voice's effect chain. [in] Returns the current values of the effect-specific parameters. [in] Identifies this call as part of a deferred batch. See the {{XAudio2 Operation Sets}} overview for more information. No documentation. HRESULT IXAudio2Voice::SetEffectParameters([None] UINT32 EffectIndex,[In, Buffer] const void* pParameters,[None] UINT32 ParametersByteSize,[None] UINT32 OperationSet) Sets parameters for a given effect in the voice's effect chain. [in] Zero-based index of an effect within the voice's effect chain. [in] Returns the current values of the effect-specific parameters. No documentation. HRESULT IXAudio2Voice::SetEffectParameters([None] UINT32 EffectIndex,[In, Buffer] const void* pParameters,[None] UINT32 ParametersByteSize,[None] UINT32 OperationSet) Sets parameters for a given effect in the voice's effect chain. [in] Zero-based index of an effect within the voice's effect chain. [in] Returns the current values of the effect-specific parameters. [in] Identifies this call as part of a deferred batch. See the {{XAudio2 Operation Sets}} overview for more information. No documentation. HRESULT IXAudio2Voice::SetEffectParameters([None] UINT32 EffectIndex,[In, Buffer] const void* pParameters,[None] UINT32 ParametersByteSize,[None] UINT32 OperationSet) Replaces the effect chain of the voice. [in, optional] an array of structure that describes the new effect chain to use. If NULL is passed, the current effect chain is removed. If array is non null, its length must be at least of 1. No documentation. HRESULT IXAudio2Voice::SetEffectChain([In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) Designates a new set of submix or mastering voices to receive the output of the voice. [in] Array of structure pointers to destination voices. If outputVoices is NULL, the voice will send its output to the current mastering voice. To set the voice to not send its output anywhere set an array of length 0. All of the voices in a send list must have the same input sample rate, see {{XAudio2 Sample Rate Conversions}} for additional information. No documentation. HRESULT IXAudio2Voice::SetOutputVoices([In, Optional] const XAUDIO2_VOICE_SENDS* pSendList) 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. [in] Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain. [in] Confirms the input channel count of the destination voice. [in] 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 pLevelMatrix[SourceChannels ? D + S]. For example, when rendering two-channel stereo input into 5.1 output that is weighted toward the front channels?but is absent from the center and low-frequency channels?the matrix might have the values shown in the following table. OutputLeft InputRight Input Left1.00.0 Right0.01.0 Front Center0.00.0 LFE0.00.0 Rear Left0.80.0 Rear Right0.00.8 Note that the left and right input are fully mapped to the output left and right channels; 80 percent of the left and right input is mapped to the rear left and right channels. See Remarks for more information on volume levels. No documentation. HRESULT IXAudio2Voice::SetOutputMatrix([In, Optional] IXAudio2Voice* pDestinationVoice,[None] UINT32 SourceChannels,[None] UINT32 DestinationChannels,[In, Buffer] const float* pLevelMatrix,[None] UINT32 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. [in] Pointer to a destination for which to set volume levels. Note If the voice sends to a single target voice then specifying NULL will cause SetOutputMatrix to operate on that target voice. [in] Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain. [in] Confirms the input channel count of the destination voice. [in] 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 pLevelMatrix[SourceChannels ? D + S]. For example, when rendering two-channel stereo input into 5.1 output that is weighted toward the front channels?but is absent from the center and low-frequency channels?the matrix might have the values shown in the following table. OutputLeft InputRight Input Left1.00.0 Right0.01.0 Front Center0.00.0 LFE0.00.0 Rear Left0.80.0 Rear Right0.00.8 Note that the left and right input are fully mapped to the output left and right channels; 80 percent of the left and right input is mapped to the rear left and right channels. See Remarks for more information on volume levels. No documentation. HRESULT IXAudio2Voice::SetOutputMatrix([In, Optional] IXAudio2Voice* pDestinationVoice,[None] UINT32 SourceChannels,[None] UINT32 DestinationChannels,[In, Buffer] const float* pLevelMatrix,[None] UINT32 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. [in] Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain. [in] Confirms the input channel count of the destination voice. [in] 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 pLevelMatrix[SourceChannels ? D + S]. For example, when rendering two-channel stereo input into 5.1 output that is weighted toward the front channels?but is absent from the center and low-frequency channels?the matrix might have the values shown in the following table. OutputLeft InputRight Input Left1.00.0 Right0.01.0 Front Center0.00.0 LFE0.00.0 Rear Left0.80.0 Rear Right0.00.8 Note that the left and right input are fully mapped to the output left and right channels; 80 percent of the left and right input is mapped to the rear left and right channels. See Remarks for more information on volume levels. [in] Identifies this call as part of a deferred batch. See the {{XAudio2 Operation Sets}} overview for more information. No documentation. HRESULT IXAudio2Voice::SetOutputMatrix([In, Optional] IXAudio2Voice* pDestinationVoice,[None] UINT32 SourceChannels,[None] UINT32 DestinationChannels,[In, Buffer] const float* pLevelMatrix,[None] UINT32 OperationSet)

The interface contains methods that notify the client when certain events happen in a given .

This interface should be implemented by the XAudio2 client. XAudio2 calls these methods through an interface reference provided by the client in the method. Methods in this interface return void, rather than an .

See the XAudio2 Callbacks topic for restrictions on callback implementation.

  • Methods
microsoft.directx_sdk.ixaudio2voicecallback.ixaudio2voicecallback IXAudio2VoiceCallback IXAudio2VoiceCallback
Called during each processing pass for each voice, just before XAudio2 reads data from the voice's buffer queue. The number of bytes that must be submitted immediately to avoid starvation. This allows the implementation of just-in-time streaming scenarios; the client can keep the absolute minimum data queued on the voice at all times, and pass it fresh data just before the data is required. This model provides the lowest possible latency attainable with XAudio2. For xWMA and XMA data BytesRequired will always be zero, since the concept of a frame of xWMA or XMA data is meaningless. Note In a situation where there is always plenty of data available on the source voice, BytesRequired should always report zero, because it doesn't need any samples immediately to avoid glitching. void IXAudio2VoiceCallback::OnVoiceProcessingPassStart([None] UINT32 BytesRequired) Called just after the processing pass for the voice ends. void IXAudio2VoiceCallback::OnVoiceProcessingPassEnd() Called when the voice has just finished playing a contiguous audio stream. void IXAudio2VoiceCallback::OnStreamEnd() Called when the voice is about to start processing a new audio buffer. Context pointer that was assigned to the pContext member of the structure when the buffer was submitted. void IXAudio2VoiceCallback::OnBufferStart([None] void* pBufferContext) Called when the voice finishes processing a buffer. Context pointer assigned to the pContext member of the structure when the buffer was submitted. void IXAudio2VoiceCallback::OnBufferEnd([None] void* pBufferContext) Called when the voice reaches the end position of a loop. Context pointer that was assigned to the pContext member of the structure when the buffer was submitted. void IXAudio2VoiceCallback::OnLoopEnd([None] void* pBufferContext) Called when a critical error occurs during voice processing. Context pointer that was assigned to the pContext member of the structure when the buffer was submitted. The HRESULT code of the error encountered. void IXAudio2VoiceCallback::OnVoiceError([None] void* pBufferContext,[None] HRESULT Error)

is the interface for the XAudio2 object that manages all audio engine states, the audio processing thread, the voice graph, and so forth.

This is the only XAudio2 interface that is derived from the COM interface. It controls the lifetime of the XAudio2 object using two methods derived from : IXAudio2::AddRef and IXAudio2::Release. No other XAudio2 objects are reference-counted; their lifetimes are explicitly controlled using create and destroy calls, and are bounded by the lifetime of the XAudio2 object that owns them.

The DirectX SDK versions of XAUDIO2 included three member functions that are not present in the Windows 8 version: GetDeviceCount, GetDeviceDetails, and Initialize. These enumeration methods are no longer provided and standard Windows Audio APIs should be used for device enumeration instead.

microsoft.directx_sdk.ixaudio2.ixaudio2 IXAudio2 IXAudio2
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion. Constant MaximumBufferBytes. XAUDIO2_MAX_BUFFER_BYTES Constant MaximumQueuedBuffers. XAUDIO2_MAX_QUEUED_BUFFERS Constant MaximumAudioChannels. XAUDIO2_MAX_AUDIO_CHANNELS Constant MinimumSampleRate. XAUDIO2_MIN_SAMPLE_RATE Constant MaximumSampleRate. XAUDIO2_MAX_SAMPLE_RATE Constant MaximumVolumeLevel. XAUDIO2_MAX_VOLUME_LEVEL Constant MinimumFrequencyRatio. XAUDIO2_MIN_FREQ_RATIO Constant MaximumFrequencyRatio. XAUDIO2_MAX_FREQ_RATIO Constant DefaultFrequencyRatio. XAUDIO2_DEFAULT_FREQ_RATIO Constant MaximumFilterOneOverQ. XAUDIO2_MAX_FILTER_ONEOVERQ Constant MaximumFilterFrequency. XAUDIO2_MAX_FILTER_FREQUENCY Constant MaximumLoopCount. XAUDIO2_MAX_LOOP_COUNT Constant CommitNow. XAUDIO2_COMMIT_NOW Constant CommitAll. XAUDIO2_COMMIT_ALL Constant NoLoopRegion. XAUDIO2_NO_LOOP_REGION Constant DefaultChannels. XAUDIO2_DEFAULT_CHANNELS Constant DefaultSampleRate. XAUDIO2_DEFAULT_SAMPLERATE

Returns current resource usage details, such as available memory or CPU usage.

For specific information on the statistics returned by GetPerformanceData, see the structure reference.

microsoft.directx_sdk.ixaudio2.ixaudio2.getperformancedata GetPerformanceData GetPerformanceData void IXAudio2::GetPerformanceData([Out] XAUDIO2_PERFORMANCE_DATA* pPerfData)

Adds an reference to the XAudio2 engine callback list.

No documentation.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

This method can be called multiple times, allowing different components or layers of the same application to manage their own engine callback implementations separately.

It is invalid to call RegisterForCallbacks from within a callback (that is, or ). If RegisterForCallbacks is called within a callback, it returns .

microsoft.directx_sdk.ixaudio2.ixaudio2.registerforcallbacks HRESULT IXAudio2::RegisterForCallbacks([In] IXAudio2EngineCallback* pCallback) IXAudio2::RegisterForCallbacks

Removes an reference from the XAudio2 engine callback list.

No documentation.

It is invalid to call UnregisterForCallbacks from within a callback (that is, or ).

microsoft.directx_sdk.ixaudio2.ixaudio2.unregisterforcallbacks void IXAudio2::UnregisterForCallbacks([In] IXAudio2EngineCallback* pCallback) IXAudio2::UnregisterForCallbacks

Creates and configures a source voice.

If successful, returns a reference to the new object.

Pointer to a one of the structures in the table below. This structure contains the expected format for all audio buffers submitted to the source voice. XAudio2 supports PCM and ADPCM voice types.

Format tagWave format structureSize (in bytes)
(0x0001) PCMWAVEFORMAT 16
-or- 18
(0x0003) [32-bit] PCMWAVEFORMAT 18
(0x0002) [MS-ADPCM] ADPCMWAVEFORMAT 50
(0xFFFE) 40

?

XAudio2 supports the following PCM formats.

  • 8-bit (unsigned) integer PCM
  • 16-bit integer PCM (optimal format for XAudio2)
  • 20-bit integer PCM (either in 24 or 32 bit containers)
  • 24-bit integer PCM (either in 24 or 32 bit containers)
  • 32-bit integer PCM
  • 32-bit float PCM (preferred format after 16-bit integer)

The number of channels in a source voice must be less than or equal to . The sample rate of a source voice must be between and .

Note??PCM data formats such as PCMWAVEFORMAT and ADPCMWAVEFORMAT that require more information than provided by have a structure as the first member in their format structures. When you create a source voice with one of those formats, cast the format's structure as a structure and use it as the value for pSourceFormat. ?

Flags that specify the behavior of the source voice. A flag can be 0 or a combination of one or more of the following:

ValueDescription
No pitch control is available on the voice.?
No sample rate conversion is available on the voice. The voice's outputs must have the same sample rate.Note??The flag causes the voice to behave as though the flag also is specified. ?
The filter effect should be available on this voice.?

?

Note??The XAUDIO2_VOICE_MUSIC flag is not supported on Windows. ?

Highest allowable frequency ratio that can be set on this voice. The value for this argument must be between and . Subsequent calls to are clamped between and MaxFrequencyRatio. The maximum value for this argument is defined as , which allows pitch to be raised by up to 10 octaves.

If MaxFrequencyRatio is less than 1.0, the voice will use that ratio immediately after being created (rather than the default of 1.0).

Xbox 360
For XMA voices, there is one more restriction on the MaxFrequencyRatio argument and the voice's sample rate. The product of these two numbers cannot exceed XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MONO for one-channel voices or XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MULTICHANNEL for voices with any other number of channels. If the value specified for MaxFrequencyRatio is too high for the specified format, the call to CreateSourceVoice fails and produces a debug message.

?

Note??You can use the lowest possible MaxFrequencyRatio value to reduce XAudio2's memory usage. ?

Pointer to a client-provided callback interface, .

Pointer to a list of structures that describe the set of destination voices for the source voice. If pSendList is null, the send list defaults to a single output to the first mastering voice created.

Pointer to a list of structures that describe an effect chain to use in the source voice.

Returns if successful; otherwise, an error code.

See XAudio2 Error Codes for descriptions of XAudio2-specific error codes.

Source voices read audio data from the client. They process the data and send it to the XAudio2 processing graph.

A source voice includes a variable-rate sample rate conversion, to convert data from the source format sample rate to the output rate required for the voice send list. If you use a null send list, the target sample rate will be the mastering voice's input sample rate. If you provide a single voice in pSendList, that voice's input sample rate is the target rate. If you provide multiple voices in the pSendList, all the source voice's output voices must be running at the same input sample rate.

You cannot create any source or submix voices until a mastering voice exists, and you cannot destory a mastering voice if any source or submix voices still exist.

Source voices are always processed before any submix or mastering voices. This means that you do not need a ProcessingStage parameter to control the processing order.

When first created, source voices are in the stopped state.

XAudio2 uses an internal memory pooler for voices with the same format. This means memory allocation for voices will occur less frequently as more voices are created and then destroyed. To minimize just-in-time allocations, a title can create the anticipated maximum number of voices needed up front, and then delete them as necessary. Voices will then be reused from the XAudio2 pool. The memory pool is tied to an XAudio2 engine instance. You can reclaim all the memory used by an instance of the XAudio2 engine by destroying the XAudio2 object and recreating it as necessary (forcing the memory pool to grow via preallocation would have to be reapplied as needed).

It is invalid to call CreateSourceVoice from within a callback (that is, or ). If you call CreateSourceVoice within a callback, it returns .

The that is passed in as the pEffectChain argument and any information contained within it are no longer needed after CreateSourceVoice successfully completes, and may be deleted immediately after CreateSourceVoice is called.

microsoft.directx_sdk.ixaudio2.ixaudio2.createsourcevoice HRESULT IXAudio2::CreateSourceVoice([Out, Fast] IXAudio2SourceVoice** ppSourceVoice,[In] const void* pSourceFormat,[In] XAUDIO2_VOICE_FLAGS Flags,[In] float MaxFrequencyRatio,[In, Optional] IXAudio2VoiceCallback* pCallback,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) IXAudio2::CreateSourceVoice

Creates and configures a submix voice.

On success, returns a reference to the new object.

Number of channels in the input audio data of the submix voice. InputChannels must be less than or equal to .

Sample rate of the input audio data of submix voice. This rate must be a multiple of XAUDIO2_QUANTUM_DENOMINATOR. InputSampleRate must be between and .

Flags that specify the behavior of the submix voice. It can be 0 or the following:

ValueDescription
The filter effect should be available on this voice.

?

An arbitrary number that specifies when this voice is processed with respect to other submix voices, if the XAudio2 engine is running other submix voices. The voice is processed after all other voices that include a smaller ProcessingStage value and before all other voices that include a larger ProcessingStage value. Voices that include the same ProcessingStage value are processed in any order. A submix voice cannot send to another submix voice with a lower or equal ProcessingStage value. This prevents audio being lost due to a submix cycle.

Pointer to a list of structures that describe the set of destination voices for the submix voice. If pSendList is null, the send list will default to a single output to the first mastering voice created.

Pointer to a list of structures that describe an effect chain to use in the submix voice.

Returns if successful; otherwise, an error code.

See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

Submix voices receive the output of one or more source or submix voices. They process the output, and then send it to another submix voice or to a mastering voice.

A submix voice performs a sample rate conversion from the input sample rate to the input rate of its output voices in pSendList. If you specify multiple voice sends, they must all have the input same sample rate.

You cannot create any source or submix voices until a mastering voice exists, and you cannot destroy a mastering voice if any source or submix voices still exist.

When first created, submix voices are in the started state.

XAudio2 uses an internal memory pooler for voices with the same format. This means that memory allocation for voices will occur less frequently as more voices are created and then destroyed. To minimize just-in-time allocations, a title can create the anticipated maximum number of voices needed up front, and then delete them as necessary. Voices will then be reused from the XAudio2 pool. The memory pool is tied to an XAudio2 engine instance. You can reclaim all the memory used by an instance of the XAudio2 engine by destroying the XAudio2 object and recreating it as necessary (forcing the memory pool to grow via preallocation would have to be reapplied as needed).

It is invalid to call CreateSubmixVoice from within a callback (that is, or ). If you call CreateSubmixVoice within a callback, it returns .

The that is passed in as the pEffectChain argument and any information contained within it are no longer needed after CreateSubmixVoice successfully completes, and may be deleted immediately after CreateSubmixVoice is called.

microsoft.directx_sdk.ixaudio2.ixaudio2.createsubmixvoice HRESULT IXAudio2::CreateSubmixVoice([Out, Fast] IXAudio2SubmixVoice** ppSubmixVoice,[In] unsigned int InputChannels,[In] unsigned int InputSampleRate,[In] unsigned int Flags,[In] unsigned int ProcessingStage,[In, Optional] const XAUDIO2_VOICE_SENDS* pSendList,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain) IXAudio2::CreateSubmixVoice

Creates and configures a mastering voice.

If successful, returns a reference to the new object.

Number of channels the mastering voice expects in its input audio. InputChannels must be less than or equal to .

You can set InputChannels to , which causes XAudio2 to try to detect the system speaker configuration setup.

Sample rate of the input audio data of the mastering voice. This rate must be a multiple of XAUDIO2_QUANTUM_DENOMINATOR. InputSampleRate must be between and .

You can set InputSampleRate to , with the default being determined by the current platform.

Windows XP defaults to 44100.

Windows Vista and Windows 7 default to the setting specified in the Sound Control Panel. The default for this setting is 44100 (or 48000 if required by the driver). Flags

Flags that specify the behavior of the mastering voice. Must be 0.

Identifier of the device to receive the output audio. Specifying the default value of null causes XAudio2 to select the global default audio device.

Pointer to an structure that describes an effect chain to use in the mastering voice, or null to use no effects.

The audio stream category to use for this mastering voice.

Returns if successful; otherwise, an error code. Returns if no default audio device exists and null is passed in as the szDeviceId parameter.

See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

Mastering voices receive the output of one or more source or submix voices. They process the data, and send it to the audio output device.

Typically, you should create a mastering voice with an input sample rate that will be used by the majority of the title's audio content. The mastering voice performs a sample rate conversion from this input sample rate to the actual device output rate.

You cannot create a source or submix voices until a mastering voice exists. You cannot destroy a mastering voice if any source or submix voices still exist.

Mastering voices are always processed after all source and submix voices. This means that you need not specify a ProcessingStage parameter to control the processing order.

XAudio2 only allows one mastering voice to exist at once. If you attempt to create more than one voice, is returned. If an additional mastering voice is needed, for example for an output device with a different audio category set, you will need to create an additional XAudio2 instance.

When first created, mastering voices are in the started state.

It is invalid to call CreateMasteringVoice from within a callback (that is, or ). If you call CreateMasteringVoice within a callback, it returns .

The that is passed in as the pEffectChain argument and any information contained within it are no longer needed after CreateMasteringVoice successfully completes, and may be deleted immediately after CreateMasteringVoice is called.

Note that the DirectX SDK XAUDIO2 version of CreateMasteringVoice took a DeviceIndex argument instead of a szDeviceId and a StreamCategory argument. This reflects the changes needed for the standard Windows device enumeration model.

hh405048 HRESULT IXAudio2::CreateMasteringVoice([Out, Fast] IXAudio2MasteringVoice** ppMasteringVoice,[In] unsigned int InputChannels,[In] unsigned int InputSampleRate,[In] unsigned int Flags,[In, Optional] const wchar_t* szDeviceId,[In, Optional] const XAUDIO2_EFFECT_CHAIN* pEffectChain,[In] AUDIO_STREAM_CATEGORY StreamCategory) IXAudio2::CreateMasteringVoice

Starts the audio processing thread.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

After StartEngine is called, all started voices begin to consume audio. All enabled effects start running, and the resulting audio is sent to any connected output devices. When XAudio2 is first initialized, the engine is already in the started state.

It is invalid to call StartEngine from within a callback (that is, or ). If StartEngine is called within a callback, it returns .

microsoft.directx_sdk.ixaudio2.ixaudio2.startengine HRESULT IXAudio2::StartEngine() IXAudio2::StartEngine

Stops the audio processing thread.

When StopEngine is called, all output is stopped immediately. However, the audio graph is left untouched, preserving effect parameters, effect histories (for example, the data stored by a reverb effect in order to emit echoes of a previous sound), voice states, pending source buffers, cursor positions, and so forth. When the engine is restarted, the resulting audio output will be identical?apart from a period of silence?to the output that would have been produced if the engine had never been stopped.

It is invalid to call StopEngine from within a callback (that is, or ).

microsoft.directx_sdk.ixaudio2.ixaudio2.stopengine void IXAudio2::StopEngine() IXAudio2::StopEngine

Atomically applies a set of operations that are tagged with a given identifier.

Identifier of the set of operations to be applied. To commit all pending operations, pass .

Returns if successful; returns an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

CommitChanges does nothing if no operations are tagged with the given identifier.

See the XAudio2 Operation Sets overview about working with CommitChanges and XAudio2 interface methods that may be deferred.

microsoft.directx_sdk.ixaudio2.ixaudio2.commitchanges HRESULT IXAudio2::CommitChanges([In] unsigned int OperationSet) IXAudio2::CommitChanges

Returns current resource usage details, such as available memory or CPU usage.

On success, reference to an structure that is returned.

For specific information on the statistics returned by GetPerformanceData, see the structure reference.

microsoft.directx_sdk.ixaudio2.ixaudio2.getperformancedata void IXAudio2::GetPerformanceData([Out] XAUDIO2_PERFORMANCE_DATA* pPerfData) IXAudio2::GetPerformanceData

Changes global debug logging options for XAudio2.

Pointer to a structure that contains the new debug configuration.

This parameter is reserved and must be null.

SetDebugConfiguration sets the debug configuration for the given instance of XAudio2 engine. See Structure for supported debug options. By default, XAudio2 does not log debug output or break on errors.

microsoft.directx_sdk.ixaudio2.ixaudio2.setdebugconfiguration void IXAudio2::SetDebugConfiguration([In, Value] const XAUDIO2_DEBUG_CONFIGURATION* pDebugConfiguration,[In] void* pReserved) IXAudio2::SetDebugConfiguration
Called by XAudio2 just before an audio processing pass begins. Called by XAudio2 just after an audio processing pass ends. Called if a critical system error occurs that requires XAudio2 to be closed down and restarted. Initializes a new instance of the class. Initializes a new instance of the class. The requested version. Initializes a new instance of the class. Specify a Debug or Normal XAudio2 instance. The processor specifier. The requestedVersion to use (auto, 2.7 or 2.8). XAudio2 requestedVersion [ + requestedVersion + ] is not installed Gets the requestedVersion of this XAudio2 instance, once a device has been instanciated. The requestedVersion. Setups the VTBL for XAudio 2.7. The 2.7 verions had 3 methods starting at VTBL[3]: - GetDeviceCount - GetDeviceDetails - Initialize No documentation. GetDeviceCount GetDeviceCount HRESULT IXAudio2::GetDeviceCount([Out] unsigned int* pCount) No documentation. No documentation. No documentation. HRESULT IXAudio2::GetDeviceCount([Out] unsigned int* pCount) IXAudio2::GetDeviceCount Returns information about an audio output device. [in] Index of the device to be queried. This value must be less than the count returned by . On success, pointer to an structure that is returned. HRESULT IXAudio2::GetDeviceDetails([None] UINT32 Index,[Out] XAUDIO2_DEVICE_DETAILS* pDeviceDetails) Calculate a decibel from a volume. The volume. a dB value Calculate radians from a cutoffs frequency. The cutoff frequency. The sample rate. radian Calculate a cutoff frequency from a radian. The radians. The sample rate. cutoff frequency Calculate a volume from a decibel a dB value an amplitude value Calculate semitones from a Frequency ratio The frequency ratio. semitones Calculate frequency from semitones. The semitones. the frequency Atomically applies a set of operations for all pending operations. HRESULT IXAudio2::CommitChanges([None] UINT32 OperationSet)

Used with when submitting xWMA data.

When streaming an xWMA file a few packets at a time, should be specified on the last packet. Alternatively, the application may call after submitting the last packet.

In addition, when streaming an xWMA file a few packets at a time, the application should subtract pDecodedPacketCumulativeBytes[PacketCount-1] of the previous packet from all the entries of the currently submitted packet.

The members of correspond to values contained in the 'dpds' RIFF chunk of the xWMA file being played. PacketCount will correspond to the size in UINT32s of the chunk. pDecodedPacketCumulativeBytes will correspond to a UINT32 buffer containing the contents of the chunk. The contents of the buffer will need to be byte swapped when loading the buffer on Xbox 360.

Memory allocated to hold a or structure can be freed as soon as the call it is passed to returns. The data the structure points to (pAudioData and pDecodedPacketCumulativeBytes, respectively) can't be freed until the buffer completes (as signaled by the callback) or the voice is stopped and destroyed.

XAUDIO 2.8 in Windows 8.x does not support xWMA decoding. Use Windows Media Foundation APIs to perform the decoding from WMA to PCM instead. This functionality is available in the DirectX SDK versions of XAUDIO and in XAUDIO 2.9 in Windows?10.

microsoft.directx_sdk.xaudio2.xaudio2_buffer_wma XAUDIO2_BUFFER_WMA XAUDIO2_BUFFER_WMA
No documentation. microsoft.directx_sdk.xaudio2.xaudio2_buffer_wma const unsigned int* pDecodedPacketCumulativeBytes unsigned int pDecodedPacketCumulativeBytes No documentation. microsoft.directx_sdk.xaudio2.xaudio2_buffer_wma unsigned int PacketCount unsigned int PacketCount

Contains the new global debug configuration for XAudio2. Used with the SetDebugConfiguration function.

Debugging messages can be completely turned off by initializing to all zeroes.

Note??For this version of XAudio2, only the value is supported on TraceMask or BreakMask. All other members and values are ignored.?
microsoft.directx_sdk.xaudio2.xaudio2_debug_configuration XAUDIO2_DEBUG_CONFIGURATION XAUDIO2_DEBUG_CONFIGURATION
No documentation. microsoft.directx_sdk.xaudio2.xaudio2_debug_configuration unsigned int TraceMask unsigned int TraceMask No documentation. microsoft.directx_sdk.xaudio2.xaudio2_debug_configuration unsigned int BreakMask unsigned int BreakMask No documentation. microsoft.directx_sdk.xaudio2.xaudio2_debug_configuration BOOL LogThreadID BOOL LogThreadID No documentation. microsoft.directx_sdk.xaudio2.xaudio2_debug_configuration BOOL LogFileline BOOL LogFileline No documentation. microsoft.directx_sdk.xaudio2.xaudio2_debug_configuration BOOL LogFunctionName BOOL LogFunctionName No documentation. microsoft.directx_sdk.xaudio2.xaudio2_debug_configuration BOOL LogTiming BOOL LogTiming

Defines an effect chain.

microsoft.directx_sdk.xaudio2.xaudio2_effect_chain XAUDIO2_EFFECT_CHAIN XAUDIO2_EFFECT_CHAIN

Number of effects in the effect chain for the voice.

microsoft.directx_sdk.xaudio2.xaudio2_effect_chain unsigned int EffectCount unsigned int EffectCount

Array of structures containing references to XAPO instances.

microsoft.directx_sdk.xaudio2.xaudio2_effect_chain XAUDIO2_EFFECT_DESCRIPTOR* pEffectDescriptors XAUDIO2_EFFECT_DESCRIPTOR pEffectDescriptors

Defines filter parameters for a source voice.

Setting with the following values is acoustically equivalent to the filter being fully bypassed.

 FilterParams;	
            FilterParams.Frequency = 1.0f;    	
            FilterParams.OneOverQ = 1.0f;	
            FilterParams.Type = LowPassFilter;	
            

The following formulas show the relationship between the members of and the per-voice filter.

Yl( n ) = F1 yb( n ) + yl( n - 1 )	
            Yb( n ) = F1 yh( n ) + yb( n - 1 )	
            Yh( n ) = x( n ) - yl( n ) - OneOverQ(yb( n - 1 )	
            Yn( n ) = Yl(n) + Yh(n) 

Where:

Yl = lowpass output	
            Yb = bandpass output	
            Yh = highpass output	
            Yn = notch output	
            F1 = .Frequency	
            OneOverQ = .OneOverQ
microsoft.directx_sdk.xaudio2.xaudio2_filter_parameters XAUDIO2_FILTER_PARAMETERS XAUDIO2_FILTER_PARAMETERS

The .

microsoft.directx_sdk.xaudio2.xaudio2_filter_parameters XAUDIO2_FILTER_TYPE Type XAUDIO2_FILTER_TYPE Type

Filter radian frequency calculated as (2 * sin(pi * (desired filter cutoff frequency) / sampleRate)). The frequency must be greater than or equal to 0 and less than or equal to . The maximum frequency allowable is equal to the source sound's sample rate divided by six which corresponds to the maximum filter radian frequency of 1. For example, if a sound's sample rate is 48000 and the desired cutoff frequency is the maximum allowable value for that sample rate, 8000, the value for Frequency will be 1. If XAUDIO2_HELPER_FUNCTIONS is defined, XAudio2.h will include the XAudio2RadiansToCutoffFrequency and XAudio2CutoffFrequencyToRadians helper functions for converting between hertz and radian frequencies. Defining XAUDIO2_HELPER_FUNCTIONS will also include XAudio2CutoffFrequencyToOnePoleCoefficient for converting between hertz and a one-pole coefficient suitable for use with the LowPassOnePoleFilter and HighPassOnePoleFilter.

microsoft.directx_sdk.xaudio2.xaudio2_filter_parameters float Frequency float Frequency

Reciprocal of Q factor. Controls how quickly frequencies beyond Frequency are dampened. Larger values result in quicker dampening while smaller values cause dampening to occur more gradually. Must be greater than 0 and less than or equal to .

microsoft.directx_sdk.xaudio2.xaudio2_filter_parameters float OneOverQ float OneOverQ

Contains performance information.

CPU cycles are recorded using . Use to convert these values.

microsoft.directx_sdk.xaudio2.xaudio2_performance_data XAUDIO2_PERFORMANCE_DATA XAUDIO2_PERFORMANCE_DATA

CPU cycles spent on audio processing since the last call to the or function.

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned longlong AudioCyclesSinceLastQuery unsigned longlong AudioCyclesSinceLastQuery

Total CPU cycles elapsed since the last call.

Note??This only counts cycles on the CPU on which XAudio2 is running. ?
microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned longlong TotalCyclesSinceLastQuery unsigned longlong TotalCyclesSinceLastQuery

Fewest CPU cycles spent on processing any single audio quantum since the last call.

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned int MinimumCyclesPerQuantum unsigned int MinimumCyclesPerQuantum

Most CPU cycles spent on processing any single audio quantum since the last call.

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned int MaximumCyclesPerQuantum unsigned int MaximumCyclesPerQuantum

Total memory currently in use.

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned int MemoryUsageInBytes unsigned int MemoryUsageInBytes

Minimum delay that occurs between the time a sample is read from a source buffer and the time it reaches the speakers.

Windows
The delay reported is a variable value equal to the rough distance between the last sample submitted to the driver by XAudio2 and the sample currently playing. The following factors can affect the delay: playing multichannel audio on a hardware-accelerated device; the type of audio device (WavePci, WaveCyclic, or WaveRT); and, to a lesser extent, audio hardware implementation.

?

Xbox 360
The delay reported is a fixed value, which is normally 1,024 samples (21.333 ms at 48 kHz). If XOverrideSpeakerConfig has been called using the XAUDIOSPEAKERCONFIG_LOW_LATENCY flag, the delay reported is 512 samples (10.667 ms at 48 kHz).

?

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned int CurrentLatencyInSamples unsigned int CurrentLatencyInSamples

Total audio dropouts since the engine started.

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned int GlitchesSinceEngineStarted unsigned int GlitchesSinceEngineStarted

Number of source voices currently playing.

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned int ActiveSourceVoiceCount unsigned int ActiveSourceVoiceCount

Total number of source voices currently in existence.

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned int TotalSourceVoiceCount unsigned int TotalSourceVoiceCount

Number of submix voices currently playing.

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned int ActiveSubmixVoiceCount unsigned int ActiveSubmixVoiceCount

Number of resampler xAPOs currently active.

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned int ActiveResamplerCount unsigned int ActiveResamplerCount

Number of matrix mix xAPOs currently active.

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned int ActiveMatrixMixCount unsigned int ActiveMatrixMixCount
Windows
Unsupported.

?

Xbox 360
Number of source voices decoding XMA data.

?

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned int ActiveXmaSourceVoices unsigned int ActiveXmaSourceVoices
Windows
Unsupported.

?

Xbox 360
A voice can use more than one XMA stream.

?

microsoft.directx_sdk.xaudio2.xaudio2_performance_data unsigned int ActiveXmaStreams unsigned int ActiveXmaStreams

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

Note the DirectX SDK versions of XAUDIO2 do not support the ActiveFlags member.

microsoft.directx_sdk.xaudio2.xaudio2_voice_details XAUDIO2_VOICE_DETAILS XAUDIO2_VOICE_DETAILS

Flags used to create the voice; see the individual voice interfaces for more information.

microsoft.directx_sdk.xaudio2.xaudio2_voice_details XAUDIO2_VOICE_FLAGS CreationFlags XAUDIO2_VOICE_FLAGS CreationFlags

Flags that are currently set on the voice.

microsoft.directx_sdk.xaudio2.xaudio2_voice_details unsigned int ActiveFlags unsigned int ActiveFlags

The number of input channels the voice expects.

microsoft.directx_sdk.xaudio2.xaudio2_voice_details unsigned int InputChannels unsigned int InputChannels

The input sample rate the voice expects.

microsoft.directx_sdk.xaudio2.xaudio2_voice_details unsigned int InputSampleRate unsigned int InputSampleRate

Defines a destination voice that is the target of a send from another voice and specifies whether a filter should be used.

microsoft.directx_sdk.xaudio2.xaudio2_send_descriptor XAUDIO2_SEND_DESCRIPTOR XAUDIO2_SEND_DESCRIPTOR

Indicates whether a filter should be used on data sent to the voice pointed to by pOutputVoice. Flags can be 0 or .

microsoft.directx_sdk.xaudio2.xaudio2_send_descriptor XAUDIO2_VOICE_SEND_FLAGS Flags XAUDIO2_VOICE_SEND_FLAGS Flags

A reference to an that will be the target of the send. The pOutputVoice member cannot be null.

microsoft.directx_sdk.xaudio2.xaudio2_send_descriptor IXAudio2Voice* pOutputVoice IXAudio2Voice pOutputVoice
Initializes a new instance of the struct. The output voice. Initializes a new instance of the struct. The send flags. The output voice. Gets or sets the output voice. This parameter cannot be null. The output voice.

Defines a set of voices to receive data from a single output voice.

If pSends is not null all of its elements must be non-null. To send output to the default mastering voice call with the pSendList argument set to null.

Setting SendCount to 0 is useful for certain effects such as volume meters or file writers that don't generate any audio output to pass on to another voice.

If needed, a voice will perform a single sample rate conversion, from the voice's input sample rate to the input sample rate of the voice's output voices. Because only one sample rate conversion will be performed, all the voice's output voices must have the same input sample rate. If the input sample rates of the voice and its output voices are the same, no sample rate conversion is performed.

microsoft.directx_sdk.xaudio2.xaudio2_voice_sends XAUDIO2_VOICE_SENDS XAUDIO2_VOICE_SENDS

Number of voices to receive the output of the voice. An OutputCount value of 0 indicates the voice should not send output to any voices.

microsoft.directx_sdk.xaudio2.xaudio2_voice_sends unsigned int SendCount unsigned int SendCount

Array of structures describing destination voices and the filters that should be used when sending to the voices. This array should contain SendCount elements. If SendCount is 0 pSends should be null. Note that pSends cannot contain the same voice more than once.

microsoft.directx_sdk.xaudio2.xaudio2_voice_sends XAUDIO2_SEND_DESCRIPTOR* pSends XAUDIO2_SEND_DESCRIPTOR pSends

Returns the voice's current state and cursor position data.

For all encoded formats, including constant bit rate (CBR) formats such as adaptive differential pulse code modulation (ADPCM), SamplesPlayed is expressed in terms of decoded samples. For pulse code modulation (PCM) formats, SamplesPlayed is expressed in terms of either input or output samples. There is a one-to-one mapping from input to output for PCM formats.

If a client needs to get the correlated positions of several voices?that is, to know exactly which sample of a particular voice is playing when a specified sample of another voice is playing?it must make the calls in an XAudio2 engine callback. Doing this ensures that none of the voices advance while the calls are made.

microsoft.directx_sdk.xaudio2.xaudio2_voice_state XAUDIO2_VOICE_STATE XAUDIO2_VOICE_STATE

Pointer to a buffer context provided in the that is processed currently, or, if the voice is stopped currently, to the next buffer due to be processed. pCurrentBufferContext is null if there are no buffers in the queue.

microsoft.directx_sdk.xaudio2.xaudio2_voice_state void* pCurrentBufferContext void pCurrentBufferContext

Number of audio buffers currently queued on the voice, including the one that is processed currently.

microsoft.directx_sdk.xaudio2.xaudio2_voice_state unsigned int BuffersQueued unsigned int BuffersQueued

Total number of samples processed by this voice since it last started, or since the last audio stream ended (as marked with the flag). This total includes samples played multiple times due to looping. Theoretically, if all audio emitted by the voice up to this time is captured, this parameter would be the length of the audio stream in samples. If you specify when you call , this member won't be calculated, and its value is unspecified on return from . takes about one-third as much time to complete when you specify .

microsoft.directx_sdk.xaudio2.xaudio2_voice_state unsigned longlong SamplesPlayed unsigned longlong SamplesPlayed
Internal class used to initialize this assembly. Initializes this assembly. This method is called when the assembly is loaded. The namespace provides a managed XAudio2 API. hh405049 XAudio2 XAudio2 No documentation. No documentation. XAUDIO2_VOICE_USEFILTER XAUDIO2_VOICE_USEFILTER None. None None Internal VoiceCallback callback Implementation Return a pointer to the unmanaged version of this callback. The callback. A pointer to a shadow c++ callback Functions

Creates a new XAudio2 object and returns a reference to its interface.

No documentation. No documentation. No documentation.

Returns if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

The DirectX SDK versions of XAUDIO2 supported a flag to select between the release and 'checked' version. This flag is not supported or defined in the Windows 8 version of XAUDIO2.

Note??No versions of the DirectX SDK contain the xaudio2.lib import library. DirectX SDK versions use COM to create a new XAudio2 object.

microsoft.directx_sdk.xaudio2.xaudio2create HRESULT XAudio2Create([Out, Fast] IXAudio2** ppXAudio2,[In] unsigned int Flags,[In] unsigned int XAudio2Processor) XAudio2Create

Creates a new reverb audio processing object (APO), and returns a reference to it.

Contains a reference to the reverb APO that is created.

If this function succeeds, it returns . Otherwise, it returns an error code.

XAudio2CreateReverb creates an effect performing Princeton Digital Reverb. The XAPO effect library (XAPOFX) includes an alternate reverb effect. Use CreateFX to create this alternate effect.

The reverb APO supports has the following restrictions:

  • Input audio data must be FLOAT32.
  • Framerate must be within XAUDIO2FX_REVERB_MIN_FRAMERATE (20,000 Hz) and XAUDIO2FX_REVERB_MAX_FRAMERATE (48,000 Hz).
  • The input and output channels must be one of the following combinations.
    • Mono input and mono output
    • Mono input and 5.1 output
    • Stereo input and stereo output
    • Stereo input and 5.1 output
The reverb APO maintains internal state information between processing samples. You can only use an instance of the APO with one source of audio data at a time. Multiple voices that require reverb effects would each need to create a separate reverb effect withXAudio2CreateReverb.

For information about creating new effects for use with XAudio2, see the XAPO Overview.

Windows

Because XAudio2CreateReverb calls CoCreateInstance on Windows, the application must have called the CoInitializeEx method before calling XAudio2CreateReverb. has the same requirement, which means CoInitializeEx typically will be called long before XAudio2CreateReverb is called.

A typical calling pattern on Windows would be as follows:

#ifndef _XBOX	
            CoInitializeEx(null, COINIT_MULTITHREADED);	
            #endif	
            * pXAudio2 = null;	
             hr;	
            if ( FAILED(hr = ( &pXAudio2, 0,  ) ) ) return hr;	
            ...	
             * pReverbAPO;	
            XAudio2CreateReverb(&pReverbAPO);	
            

?

The xaudio2fx.h header defines the AudioReverb class as a cross-platform audio processing object (XAPO).

class __declspec(uuid("C2633B16-471B-4498-B8C5-4F0959E2EC09")) AudioReverb;

XAudio2CreateReverb returns this object as a reference to a reference to in the ppApo parameter. Although you can query the and interfaces from this , you typically never use these interfaces directly. Instead, you use them when you create a voice to add them as part of the effects chain.

The reverb uses the parameter structure that you access via the .

Note??XAudio2CreateReverb is an inline function in xaudio2fx.h that calls CreateAudioReverb:

XAUDIO2FX_STDAPI CreateAudioReverb(_Outptr_ ** ppApo); __inline XAudio2CreateReverb(_Outptr_ ** ppApo, UINT32 /*Flags*/ DEFAULT(0)) { return CreateAudioReverb(ppApo); }
microsoft.directx_sdk.xaudio2.xaudio2createreverb HRESULT CreateAudioReverb([Out, Fast] IUnknown** ppApo) CreateAudioReverb

Creates a new volume meter audio processing object (APO) and returns a reference to it.

Contains the created volume meter APO.

If this function succeeds, it returns . Otherwise, it returns an error code.

For information on creating new effects for use with XAudio2, see the XAPO Overview.

Windows

Because XAudio2CreateVolumeMeter calls CoCreateInstance on Windows, the application must have called the CoInitializeEx method before calling XAudio2CreateVolumeMeter. has the same requirement, which means CoInitializeEx typically will be called long before XAudio2CreateVolumeMeter is called.

A typical calling pattern on Windows would be as follows:

#ifndef _XBOX	
            CoInitializeEx(null, COINIT_MULTITHREADED);	
            #endif	
            * pXAudio2 = null;	
             hr;	
            if ( FAILED(hr = ( &pXAudio2, 0,  ) ) ) return hr;	
            ...	
             * pVolumeMeterAPO;	
            XAudio2CreateVolumeMeter(&pVolumeMeterAPO);	
            

?

The xaudio2fx.h header defines the AudioVolumeMeter class as a cross-platform audio processing object (XAPO).

class __declspec(uuid("4FC3B166-972A-40CF-BC37-7DB03DB2FBA3")) AudioVolumeMeter;

XAudio2CreateVolumeMeter returns this object as a reference to a reference to in the ppApo parameter. Although you can query the and interfaces from this , you typically never use these interfaces directly. Instead, you use them when you create a voice to add them as part of the effects chain.

The volume meter uses the parameter structure that you access via the method when the XAPO is bound to the audio graph.

Note??XAudio2CreateVolumeMeter is an inline function in xaudio2fx.h that calls CreateAudioVolumeMeter:

XAUDIO2FX_STDAPI CreateAudioVolumeMeter(_Outptr_ ** ppApo); __inline XAudio2CreateVolumeMeter(_Outptr_ ** ppApo, UINT32 /*Flags*/ DEFAULT(0)) { return CreateAudioVolumeMeter(ppApo); }
microsoft.directx_sdk.xaudio2.xaudio2createvolumemeter HRESULT CreateAudioVolumeMeter([Out, Fast] IUnknown** ppApo) CreateAudioVolumeMeter
An enum to select the XAudio version to load. The default version (2.7 if it is installed, otherwise 2.8 or 2.9) The XAudio2.7 version. The XAudio2.8 version. The XAudio2.9 version. No documentation. X3DAudioCalculateFlags X3DAudioCalculateFlags No documentation. X3DAUDIO_CALCULATE_MATRIX X3DAUDIO_CALCULATE_MATRIX No documentation. X3DAUDIO_CALCULATE_DELAY X3DAUDIO_CALCULATE_DELAY No documentation. X3DAUDIO_CALCULATE_LPF_DIRECT X3DAUDIO_CALCULATE_LPF_DIRECT No documentation. X3DAUDIO_CALCULATE_LPF_REVERB X3DAUDIO_CALCULATE_LPF_REVERB No documentation. X3DAUDIO_CALCULATE_REVERB X3DAUDIO_CALCULATE_REVERB No documentation. X3DAUDIO_CALCULATE_DOPPLER X3DAUDIO_CALCULATE_DOPPLER No documentation. X3DAUDIO_CALCULATE_EMITTER_ANGLE X3DAUDIO_CALCULATE_EMITTER_ANGLE No documentation. X3DAUDIO_CALCULATE_ZEROCENTER X3DAUDIO_CALCULATE_ZEROCENTER No documentation. X3DAUDIO_CALCULATE_REDIRECT_TO_LFE X3DAUDIO_CALCULATE_REDIRECT_TO_LFE Functions Speed of sound in the air. Initializes a new instance of the class. The speakers config. microsoft.directx_sdk.x3daudio.x3daudioinitialize void X3DAudioInitialize([In] SPEAKER_FLAGS SpeakerChannelMask,[In] float SpeedOfSound,[Out] X3DAUDIOHANDLE* Instance) X3DAudioInitialize Initializes a new instance of the class. The speakers config. The requestVersion. microsoft.directx_sdk.x3daudio.x3daudioinitialize void X3DAudioInitialize([In] SPEAKER_FLAGS SpeakerChannelMask,[In] float SpeedOfSound,[Out] X3DAUDIOHANDLE* Instance) X3DAudioInitialize Initializes a new instance of the class. The speakers config. The speed of sound. The request requestVersion. microsoft.directx_sdk.x3daudio.x3daudioinitialize void X3DAudioInitialize([In] SPEAKER_FLAGS SpeakerChannelMask,[In] float SpeedOfSound,[Out] X3DAUDIOHANDLE* Instance) X3DAudioInitialize Gets the requestVersion of X3DAudio used. The requestVersion. Calculates DSP settings for the specified listener and emitter. The listener. The emitter. The flags. The source channel count. The destination channel count. DSP settings ee419052 void X3DAudioCalculate([In] const X3DAUDIOHANDLE* Instance,[In] const X3DAUDIO_LISTENER* pListener,[In] const X3DAUDIO_EMITTER* pEmitter,[In] X3DAudioCalculateFlags Flags,[In] void* pDSPSettings) X3DAudioCalculate Calculates DSP settings for the specified listener and emitter. See remarks. The listener. The emitter. The flags. The settings. The source and destination channel count must be set on before calling this method. ee419052 void X3DAudioCalculate([In] const X3DAUDIOHANDLE* Instance,[In] const X3DAUDIO_LISTENER* pListener,[In] const X3DAUDIO_EMITTER* pEmitter,[In] X3DAudioCalculateFlags Flags,[In] void* pDSPSettings) X3DAudioCalculate

Specifies directionality for a single-channel non-LFE emitter by scaling DSP behavior with respect to the emitter's orientation.

For a detailed explanation of sound cones see Sound Cones.

microsoft.directx_sdk.x3daudio.x3daudio_cone X3DAUDIO_CONE X3DAUDIO_CONE

Inner cone angle in radians. This value must be within 0.0f to X3DAUDIO_2PI.

microsoft.directx_sdk.x3daudio.x3daudio_cone float InnerAngle float InnerAngle

Outer cone angle in radians. This value must be within InnerAngle to X3DAUDIO_2PI.

microsoft.directx_sdk.x3daudio.x3daudio_cone float OuterAngle float OuterAngle

Volume scaler on/within inner cone. This value must be within 0.0f to 2.0f.

microsoft.directx_sdk.x3daudio.x3daudio_cone float InnerVolume float InnerVolume

Volume scaler on/beyond outer cone. This value must be within 0.0f to 2.0f.

microsoft.directx_sdk.x3daudio.x3daudio_cone float OuterVolume float OuterVolume

LPF direct-path or reverb-path coefficient scaler on/within inner cone. This value is only used for LPF calculations and must be within 0.0f to 1.0f.

microsoft.directx_sdk.x3daudio.x3daudio_cone float InnerLPF float InnerLPF

LPF direct-path or reverb-path coefficient scaler on or beyond outer cone. This value is only used for LPF calculations and must be within 0.0f to 1.0f.

microsoft.directx_sdk.x3daudio.x3daudio_cone float OuterLPF float OuterLPF

Reverb send level scaler on or within inner cone. This must be within 0.0f to 2.0f.

microsoft.directx_sdk.x3daudio.x3daudio_cone float InnerReverb float InnerReverb

Reverb send level scaler on/beyond outer cone. This must be within 0.0f to 2.0f.

microsoft.directx_sdk.x3daudio.x3daudio_cone float OuterReverb float OuterReverb

Defines a DSP setting at a given normalized distance.

microsoft.directx_sdk.x3daudio.x3daudio_distance_curve_point X3DAUDIO_DISTANCE_CURVE_POINT X3DAUDIO_DISTANCE_CURVE_POINT

Normalized distance. This must be within 0.0f to 1.0f.

microsoft.directx_sdk.x3daudio.x3daudio_distance_curve_point float Distance float Distance

DSP control setting.

microsoft.directx_sdk.x3daudio.x3daudio_distance_curve_point float DSPSetting float DSPSetting

Defines an explicit piecewise curve made up of linear segments, directly defining DSP behavior with respect to normalized distance.

microsoft.directx_sdk.x3daudio.x3daudio_distance_curve X3DAUDIO_DISTANCE_CURVE X3DAUDIO_DISTANCE_CURVE

array. The array must have no duplicates and be sorted in ascending order with respect to distance.

microsoft.directx_sdk.x3daudio.x3daudio_distance_curve X3DAUDIO_DISTANCE_CURVE_POINT* pPoints X3DAUDIO_DISTANCE_CURVE_POINT pPoints

Number of distance curve points. There must be two or more points since all curves must have at least two endpoints defining values at 0.0f and 1.0f normalized distance, respectively.

microsoft.directx_sdk.x3daudio.x3daudio_distance_curve unsigned int PointCount unsigned int PointCount

Receives the results from a call to X3DAudioCalculate.

The following members must be initialized before passing this structure to the X3DAudioCalculate function:

  • pMatrixCoefficients
  • pDelayTimes
  • SrcChannelCount
  • DstChannelCount

The following members are returned by passing this structure to the X3DAudioCalculate function:

  • pMatrixCoefficients
  • pDelayTimes
  • LPFDirectCoefficient
  • LPFReverbCoefficient
  • ReverbLevel
  • DopplerFactor
  • EmitterToListenerAngle
  • EmitterToListenerDistance
  • EmitterVelocityComponent
  • ListenerVelocityComponent
Note??For pMatrixCoefficients and pDelayTimes, X3DAudioCalculate does not allocate additional memory. X3DAudioCalculate merely modifies the values at the memory locations allocated for these references.?
microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings X3DAUDIO_DSP_SETTINGS X3DAUDIO_DSP_SETTINGS No documentation. X3DAUDIO_DSP_SETTINGS
No documentation. microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings float* pMatrixCoefficients float pMatrixCoefficients No documentation. microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings float* pDelayTimes float pDelayTimes No documentation. microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings unsigned int SrcChannelCount unsigned int SrcChannelCount No documentation. microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings unsigned int DstChannelCount unsigned int DstChannelCount No documentation. microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings float LPFDirectCoefficient float LPFDirectCoefficient No documentation. microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings float LPFReverbCoefficient float LPFReverbCoefficient No documentation. microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings float ReverbLevel float ReverbLevel No documentation. microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings float DopplerFactor float DopplerFactor No documentation. microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings float EmitterToListenerAngle float EmitterToListenerAngle No documentation. microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings float EmitterToListenerDistance float EmitterToListenerDistance No documentation. microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings float EmitterVelocityComponent float EmitterVelocityComponent No documentation. microsoft.directx_sdk.x3daudio.x3daudio_dsp_settings float ListenerVelocityComponent float ListenerVelocityComponent Initializes a new instance of the class. The source channel count. The destination channel count. The matrix coefficients The delay times

Defines a single-point or multiple-point 3D audio source that is used with an arbitrary number of sound channels.

only supports a cone in a single-point emitter. Multi-point emitters are a convenient and efficient way to manage a related group of sound sources. Many properties are shared among all channel points, such as Doppler?the same Doppler shift is applied to all channels in the emitter. Thus, the Doppler value need only be calculated once, not per-point as would be needed with multiple separate single-point emitters. Because only has one orientation vector, a multi-point emitter cone would be of limited usefulness, forcing all channels to behave as if they were facing the same direction. If multiple independent cones are needed, multiple single-point emitters should be used, each with its own orientation.

The parameter type is typed to DirectX::XMFLOAT3, to provide x , y , and z floating-point values.

X3DAudio uses a left-handed Cartesian coordinate system, with values on the x-axis increasing from left to right, on the y-axis from bottom to top, and on the z-axis from near to far. Azimuths are measured clockwise from a given reference direction. To use X3DAudio with right-handed coordinates, you must negate the .z element of OrientFront, OrientTop, Position, and Velocity.

For user-defined distance curves, the distance field of the first point must be 0.0f and the distance field of the last point must be 1.0f.

If an emitter moves beyond a distance of (CurveDistanceScaler ? 1.0f), the last point on the curve is used to compute the volume output level. The last point is determined by the following:

.pPoints[PointCount-1].DSPSetting)
microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_EMITTER X3DAUDIO_EMITTER No documentation. X3DAUDIO_EMITTER

Pointer to a sound cone. Used only with single-channel emitters for matrix, LPF (both direct and reverb paths), and reverb calculations. null specifies the emitter is omnidirectional.

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_CONE* pCone X3DAUDIO_CONE pCone

Orientation of the front direction. This value must be orthonormal with OrientTop. OrientFront must be normalized when used. For single-channel emitters without cones OrientFront is only used for emitter angle calculations. For multi channel emitters or single-channel with cones OrientFront is used for matrix, LPF (both direct and reverb paths), and reverb calculations.

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_VECTOR OrientFront X3DAUDIO_VECTOR OrientFront

Orientation of the top direction. This value must be orthonormal with OrientFront. OrientTop is only used with multi-channel emitters for matrix calculations.

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_VECTOR OrientTop X3DAUDIO_VECTOR OrientTop

Position in user-defined world units. This value does not affect Velocity.

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_VECTOR Position X3DAUDIO_VECTOR Position

Velocity vector in user-defined world units/second. This value is used only for doppler calculations. It does not affect Position.

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_VECTOR Velocity X3DAUDIO_VECTOR Velocity

Value to be used for the inner radius calculations. If InnerRadius is 0, then no inner radius is used, but InnerRadiusAngle may still be used. This value must be between 0.0f and MAX_FLT.

microsoft.directx_sdk.x3daudio.x3daudio_emitter float InnerRadius float InnerRadius

Value to be used for the inner radius angle calculations. This value must be between 0.0f and X3DAUDIO_PI/4.0.

microsoft.directx_sdk.x3daudio.x3daudio_emitter float InnerRadiusAngle float InnerRadiusAngle

Number of emitters defined by the structure. Must be greater than 0.

microsoft.directx_sdk.x3daudio.x3daudio_emitter unsigned int ChannelCount unsigned int ChannelCount

Distance from Position that channels will be placed if ChannelCount is greater than 1. ChannelRadius is only used with multi-channel emitters for matrix calculations. Must be greater than or equal to 0.0f.

microsoft.directx_sdk.x3daudio.x3daudio_emitter float ChannelRadius float ChannelRadius

Table of channel positions, expressed as an azimuth in radians along the channel radius with respect to the front orientation vector in the plane orthogonal to the top orientation vector. An azimuth of X3DAUDIO_2PI specifies a channel is a low-frequency effects (LFE) channel. LFE channels are positioned at the emitter base and are calculated with respect to pLFECurve only, never pVolumeCurve. pChannelAzimuths must have at least ChannelCount elements, but can be null if ChannelCount = 1. The table values must be within 0.0f to X3DAUDIO_2PI. pChannelAzimuths is used with multi-channel emitters for matrix calculations.

microsoft.directx_sdk.x3daudio.x3daudio_emitter float* pChannelAzimuths float pChannelAzimuths

Volume-level distance curve, which is used only for matrix calculations. null specifies a specialized default curve that conforms to the inverse square law, such that when distance is between 0.0f and CurveDistanceScaler ? 1.0f, no attenuation is applied. When distance is greater than CurveDistanceScaler ? 1.0f, the amplification factor is (CurveDistanceScaler ? 1.0f)/distance. At a distance of CurveDistanceScaler ? 2.0f, the sound will be at half volume or -6 dB, at a distance of CurveDistanceScaler ? 4.0f, the sound will be at one quarter volume or -12 dB, and so on. pVolumeCurve and pLFECurve are independent of each other. pVolumeCurve does not affect LFE channel volume.

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_DISTANCE_CURVE* pVolumeCurve X3DAUDIO_DISTANCE_CURVE pVolumeCurve

LFE roll-off distance curve, or null to use default curve: [0.0f, CurveDistanceScaler ?1.0f], [CurveDistanceScaler ?1.0f, 0.0f]. A null value for pLFECurve specifies a default curve that conforms to the inverse square law with distances <= CurveDistanceScaler clamped to no attenuation. pVolumeCurve and pLFECurve are independent of each other. pLFECurve does not affect non LFE channel volume.

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_DISTANCE_CURVE* pLFECurve X3DAUDIO_DISTANCE_CURVE pLFECurve

Low-pass filter (LPF) direct-path coefficient distance curve, or null to use the default curve: [0.0f, 1.0f], [1.0f, 0.75f]. pLPFDirectCurve is only used for LPF direct-path calculations.

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_DISTANCE_CURVE* pLPFDirectCurve X3DAUDIO_DISTANCE_CURVE pLPFDirectCurve

LPF reverb-path coefficient distance curve, or null to use default curve: [0.0f, 0.75f], [1.0f, 0.75f]. pLPFReverbCurve is only used for LPF reverb path calculations.

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_DISTANCE_CURVE* pLPFReverbCurve X3DAUDIO_DISTANCE_CURVE pLPFReverbCurve

Reverb send level distance curve, or null to use default curve: [0.0f, 1.0f], [1.0f, 0.0f].

microsoft.directx_sdk.x3daudio.x3daudio_emitter X3DAUDIO_DISTANCE_CURVE* pReverbCurve X3DAUDIO_DISTANCE_CURVE pReverbCurve

Curve distance scaler that is used to scale normalized distance curves to user-defined world units, and/or to exaggerate their effect. This does not affect any other calculations. The value must be within the range FLT_MIN to FLT_MAX. CurveDistanceScaler is only used for matrix, LPF (both direct and reverb paths), and reverb calculations.

microsoft.directx_sdk.x3daudio.x3daudio_emitter float CurveDistanceScaler float CurveDistanceScaler

Doppler shift scaler that is used to exaggerate Doppler shift effect. DopplerScaler is only used for Doppler calculations and does not affect any other calculations. The value must be within the range 0.0f to FLT_MAX.

microsoft.directx_sdk.x3daudio.x3daudio_emitter float DopplerScaler float DopplerScaler
Reference to Cone data. X3DAUDIO_CONE* pCone disabled as it is not used

Defines a point of 3D audio reception.

X3DAudio uses a left-handed Cartesian coordinate system, with values on the x-axis increasing from left to right, on the y-axis from bottom to top, and on the z-axis from near to far. Azimuths are measured clockwise from a given reference direction. To use X3DAudio with right-handed coordinates, you must negate the .z element of OrientFront, OrientTop, Position, and Velocity.

The parameter type is typed to DirectX::XMFLOAT3, to provide x, y and z floating-point values.

A listener's front and top vectors must be orthonormal. To be considered orthonormal, a pair of vectors must have a magnitude of 1 +- 1x10-5 and a dot product of 0 +- 1x10-5.

microsoft.directx_sdk.x3daudio.x3daudio_listener X3DAUDIO_LISTENER X3DAUDIO_LISTENER No documentation. X3DAUDIO_LISTENER

Orientation of front direction. When pCone is null OrientFront is used only for matrix and delay calculations. When pCone is not null OrientFront is used for matrix, LPF (both direct and reverb paths), and reverb calculations. This value must be orthonormal with OrientTop when used.

microsoft.directx_sdk.x3daudio.x3daudio_listener X3DAUDIO_VECTOR OrientFront X3DAUDIO_VECTOR OrientFront

Orientation of top direction, used only for matrix and delay calculations. This value must be orthonormal with OrientFront when used.

microsoft.directx_sdk.x3daudio.x3daudio_listener X3DAUDIO_VECTOR OrientTop X3DAUDIO_VECTOR OrientTop

Position in user-defined world units. This value does not affect Velocity.

microsoft.directx_sdk.x3daudio.x3daudio_listener X3DAUDIO_VECTOR Position X3DAUDIO_VECTOR Position

Velocity vector in user-defined world units per second, used only for doppler calculations. This value does not affect Position.

microsoft.directx_sdk.x3daudio.x3daudio_listener X3DAUDIO_VECTOR Velocity X3DAUDIO_VECTOR Velocity

Pointer to an structure for this listener. Providing a listener cone will specify that additional calculations are performed when determining the volume and filter DSP parameters for individual sound sources. A null pCone value specifies an omnidirectional sound and no cone processing is applied. pCone is only used for matrix, LPF (both direct and reverb paths), and reverb calculations.

microsoft.directx_sdk.x3daudio.x3daudio_listener X3DAUDIO_CONE* pCone X3DAUDIO_CONE pCone
Reference to Cone data. X3DAUDIO_CONE* pCone Disabled as it is not used The namespace provides a managed X3DAudio API. ee415714 X3DAudio X3DAudio Functions

Calculates DSP settings with respect to 3D parameters.

3D audio instance handle. Call to get this handle.

Pointer to an representing the point of reception.

Pointer to an representing the sound source.

ValueDescription
Enables matrix coefficient table calculation.?
Enables delay time array calculation (stereo only).?
Enables low pass filter (LPF) direct-path coefficient calculation.?
Enables LPF reverb-path coefficient calculation.?
Enables reverb send level calculation.?
Enables Doppler shift factor calculation.?
Enables emitter-to-listener interior angle calculation.?
Fills the center channel with silence. This flag allows you to keep a 6-channel matrix so you do not have to remap the channels, but the center channel will be silent. This flag is only valid if you also set .?
Applies an equal mix of all source channels to a low frequency effect (LFE) destination channel. It only applies to matrix calculations with a source that does not have an LFE channel and a destination that does have an LFE channel. This flag is only valid if you also set .?

?

Pointer to an structure that receives the calculation results.

You typically call once for each pair of emitting objects and listeners in the scene. After each call, to apply the 3D effects, the app manually applies the calculation results at pDSPSettings to the XAUDIO2 graph. For more info, see How to: Integrate X3DAudio with XAudio2.

Important?? The listener and emitter values must be valid. Floating-point specials (NaN, QNaN, +INF, -INF) can cause the entire audio output to go silent if introduced into a running audio graph.

microsoft.directx_sdk.x3daudio.x3daudiocalculate void X3DAudioCalculate([In] const X3DAUDIOHANDLE* Instance,[In] const X3DAUDIO_LISTENER* pListener,[In] const X3DAUDIO_EMITTER* pEmitter,[In] X3DAudioCalculateFlags Flags,[In] void* pDSPSettings) X3DAudioCalculate

Sets all global 3D audio constants.

Assignment of channels to speaker positions. This value must not be zero. The only permissible value on Xbox 360 is SPEAKER_XBOX.

Speed of sound, in user-defined world units per second. Use this value only for doppler calculations. It must be greater than or equal to FLT_MIN.

3D audio instance handle. Use this handle when you call .

This function does not return a value.

X3DAUDIO_HANDLE is an opaque data structure. Because the operating system doesn't allocate any additional storage for the 3D audio instance handle, you don't need to free or close it.

microsoft.directx_sdk.x3daudio.x3daudioinitialize HRESULT X3DAudioInitialize([In] SPEAKER_FLAGS SpeakerChannelMask,[In] float SpeedOfSound,[Out] X3DAUDIOHANDLE* Instance) X3DAudioInitialize
Functions

Calculates DSP settings with respect to 3D parameters.

3D audio instance handle. Call to get this handle.

Pointer to an representing the point of reception.

Pointer to an representing the sound source.

ValueDescription
Enables matrix coefficient table calculation.?
Enables delay time array calculation (stereo only).?
Enables low pass filter (LPF) direct-path coefficient calculation.?
Enables LPF reverb-path coefficient calculation.?
Enables reverb send level calculation.?
Enables Doppler shift factor calculation.?
Enables emitter-to-listener interior angle calculation.?
Fills the center channel with silence. This flag allows you to keep a 6-channel matrix so you do not have to remap the channels, but the center channel will be silent. This flag is only valid if you also set .?
Applies an equal mix of all source channels to a low frequency effect (LFE) destination channel. It only applies to matrix calculations with a source that does not have an LFE channel and a destination that does have an LFE channel. This flag is only valid if you also set .?

?

Pointer to an structure that receives the calculation results.

You typically call once for each pair of emitting objects and listeners in the scene. After each call, to apply the 3D effects, the app manually applies the calculation results at pDSPSettings to the XAUDIO2 graph. For more info, see How to: Integrate X3DAudio with XAudio2.

Important?? The listener and emitter values must be valid. Floating-point specials (NaN, QNaN, +INF, -INF) can cause the entire audio output to go silent if introduced into a running audio graph.

microsoft.directx_sdk.x3daudio.x3daudiocalculate void X3DAudioCalculate([In] const X3DAUDIOHANDLE* Instance,[In] const X3DAUDIO_LISTENER* pListener,[In] const X3DAUDIO_EMITTER* pEmitter,[In] X3DAudioCalculateFlags Flags,[In] void* pDSPSettings) X3DAudioCalculate

Sets all global 3D audio constants.

Assignment of channels to speaker positions. This value must not be zero. The only permissible value on Xbox 360 is SPEAKER_XBOX.

Speed of sound, in user-defined world units per second. Use this value only for doppler calculations. It must be greater than or equal to FLT_MIN.

3D audio instance handle. Use this handle when you call .

This function does not return a value.

X3DAUDIO_HANDLE is an opaque data structure. Because the operating system doesn't allocate any additional storage for the 3D audio instance handle, you don't need to free or close it.

microsoft.directx_sdk.x3daudio.x3daudioinitialize HRESULT X3DAudioInitialize([In] SPEAKER_FLAGS SpeakerChannelMask,[In] float SpeedOfSound,[Out] X3DAUDIOHANDLE* Instance) X3DAudioInitialize
An enum to select the XAudio version to load. The default version (X3DAudio1_7.dll if it is installed, otherwise XAudio2_8.dll or from XAudio2_9.dll) The X3DAudio1.7 version (X3DAudio1_7.dll). From the XAudio2.8 version (XAudio2_8.dll). From the XAudio2.9 version (XAudio2_9.dll).

Describes the contents of a stream buffer.

This metadata can be used to implement optimizations that require knowledge of a stream buffer's contents. For example, XAPOs that always produce silent output from silent input can check the flag on the input stream buffer to determine if any signal processing is necessary. If silent, the XAPO can simply set the flag on the output stream buffer to silent and return, thus averting the work of processing silent data.

Likewise, XAPOs that receive valid input data, but generate silence (for any reason), may set the output stream buffer's flag accordingly, rather than writing silent samples to the buffer.

These flags represent what should be assumed is in the respective buffer. The flags may not reflect what is actually stored in memory. For example, the indicates that silent data should be assumed, however the respective memory may be uninitialized

microsoft.directx_sdk.xapo.xapo_buffer_flags XAPO_BUFFER_FLAGS XAPO_BUFFER_FLAGS

Stream buffer contains only silent samples.

microsoft.directx_sdk.xapo.xapo_buffer_flags XAPO_BUFFER_SILENT XAPO_BUFFER_SILENT

Stream buffer contains audio data to be processed.

microsoft.directx_sdk.xapo.xapo_buffer_flags XAPO_BUFFER_VALID XAPO_BUFFER_VALID
None. None None No documentation. XAPO_PROPERTY_TYPE XAPO_PROPERTY_TYPE No documentation. XAPO_FLAG_CHANNELS_MUST_MATCH XAPO_FLAG_CHANNELS_MUST_MATCH No documentation. XAPO_FLAG_FRAMERATE_MUST_MATCH XAPO_FLAG_FRAMERATE_MUST_MATCH No documentation. XAPO_FLAG_BITSPERSAMPLE_MUST_MATCH XAPO_FLAG_BITSPERSAMPLE_MUST_MATCH No documentation. XAPO_FLAG_BUFFERCOUNT_MUST_MATCH XAPO_FLAG_BUFFERCOUNT_MUST_MATCH No documentation. XAPO_FLAG_INPLACE_REQUIRED XAPO_FLAG_INPLACE_REQUIRED No documentation. XAPO_FLAG_INPLACE_SUPPORTED XAPO_FLAG_INPLACE_SUPPORTED No documentation. XAPO_FLAG_DEFAULT XAPO_FLAG_DEFAULT Functions An Echo XAPO AudioProcessor Constant MinimumWetdrymix. FXECHO_MIN_WETDRYMIX Constant MaximumWetdrymix. FXECHO_MAX_WETDRYMIX Constant DefaultWetdrymix. FXECHO_DEFAULT_WETDRYMIX Constant MinimumFeedback. FXECHO_MIN_FEEDBACK Constant MaximumFeedback. FXECHO_MAX_FEEDBACK Constant DefaultFeedback. FXECHO_DEFAULT_FEEDBACK Constant MinimumDelay. FXECHO_MIN_DELAY Constant MaximumDelay. FXECHO_MAX_DELAY Constant DefaultDelay. FXECHO_DEFAULT_DELAY Initializes a new instance of the class. Functions A Equalizer XAPO AudioProcessor Constant MinimumFrameRate. FXEQ_MIN_FRAMERATE Constant MaximumFrameRate. FXEQ_MAX_FRAMERATE Constant MinimumFrequencyCenter. FXEQ_MIN_FREQUENCY_CENTER Constant MaximumFrequencyCenter. FXEQ_MAX_FREQUENCY_CENTER Constant DefaultFrequencyCenter0. FXEQ_DEFAULT_FREQUENCY_CENTER_0 Constant DefaultFrequencyCenter1. FXEQ_DEFAULT_FREQUENCY_CENTER_1 Constant DefaultFrequencyCenter2. FXEQ_DEFAULT_FREQUENCY_CENTER_2 Constant DefaultFrequencyCenter3. FXEQ_DEFAULT_FREQUENCY_CENTER_3 Constant MinimumGain. FXEQ_MIN_GAIN Constant MaximumGain. FXEQ_MAX_GAIN Constant DefaultGain. FXEQ_DEFAULT_GAIN Constant MinimumBandwidth. FXEQ_MIN_BANDWIDTH Constant MaximumBandwidth. FXEQ_MAX_BANDWIDTH Constant DefaultBandwidth. FXEQ_DEFAULT_BANDWIDTH Initializes a new instance of the class. Functions A MateringLimiter XAPO AudioProcessor Constant MinimumRelease. FXMASTERINGLIMITER_MIN_RELEASE Constant MaximumRelease. FXMASTERINGLIMITER_MAX_RELEASE Constant DefaultRelease. FXMASTERINGLIMITER_DEFAULT_RELEASE Constant MinimumLoudness. FXMASTERINGLIMITER_MIN_LOUDNESS Constant MaximumLoudness. FXMASTERINGLIMITER_MAX_LOUDNESS Constant DefaultLoudness. FXMASTERINGLIMITER_DEFAULT_LOUDNESS Initializes a new instance of the class. Functions A Reverb XAPO AudioProcessor Constant MinimumDiffusion. FXREVERB_MIN_DIFFUSION Constant MaximumDiffusion. FXREVERB_MAX_DIFFUSION Constant DefaultDiffusion. FXREVERB_DEFAULT_DIFFUSION Constant MinimumRoomsize. FXREVERB_MIN_ROOMSIZE Constant MaximumRoomsize. FXREVERB_MAX_ROOMSIZE Constant DefaultRoomsize. FXREVERB_DEFAULT_ROOMSIZE Initializes a new instance of the class. Functions Functions Constant None. Constant None. Constant None. Constant None.

Initialization parameters for use with the FXECHO XAPOFX.

Use of this structure is optional. The default MaxDelay is .

Note??The DirectX SDK versions of XAUDIO2 don't support this functionality.?
microsoft.directx_sdk.xapofx.fxecho_initdata FXECHO_INITDATA FXECHO_INITDATA
No documentation. microsoft.directx_sdk.xapofx.fxecho_initdata float MaxDelay float MaxDelay

Parameters for use with the FXECHO XAPOFX.

Echo only supports FLOAT32 audio formats.

microsoft.directx_sdk.xapofx.fxecho_parameters FXECHO_PARAMETERS FXECHO_PARAMETERS
No documentation. microsoft.directx_sdk.xapofx.fxecho_parameters float WetDryMix float WetDryMix No documentation. microsoft.directx_sdk.xapofx.fxecho_parameters float Feedback float Feedback No documentation. microsoft.directx_sdk.xapofx.fxecho_parameters float Delay float Delay

Parameters for use with the FXEQ XAPO.

Each band ranges from FrequencyCenterN - (BandwidthN / 2) to FrequencyCenterN + (BandwidthN / 2).

microsoft.directx_sdk.xapofx.fxeq_parameters FXEQ_PARAMETERS FXEQ_PARAMETERS

Center frequency in Hz for band 0. Must be between and .

microsoft.directx_sdk.xapofx.fxeq_parameters float FrequencyCenter0 float FrequencyCenter0

The boost or decrease to frequencies in band 0. Must be between and

microsoft.directx_sdk.xapofx.fxeq_parameters float Gain0 float Gain0

Width of band 0. Must be between and .

microsoft.directx_sdk.xapofx.fxeq_parameters float Bandwidth0 float Bandwidth0

Center frequency in Hz for band 1. Must be between and .

microsoft.directx_sdk.xapofx.fxeq_parameters float FrequencyCenter1 float FrequencyCenter1

The boost or decrease to frequencies in band 1. Must be between and

microsoft.directx_sdk.xapofx.fxeq_parameters float Gain1 float Gain1

Width of band 1. Must be between and .

microsoft.directx_sdk.xapofx.fxeq_parameters float Bandwidth1 float Bandwidth1

Center frequency in Hz for band 2. Must be between and .

microsoft.directx_sdk.xapofx.fxeq_parameters float FrequencyCenter2 float FrequencyCenter2

The boost or decrease to frequencies in band 2. Must be between and

microsoft.directx_sdk.xapofx.fxeq_parameters float Gain2 float Gain2

Width of band 2. Must be between and .

microsoft.directx_sdk.xapofx.fxeq_parameters float Bandwidth2 float Bandwidth2

Center frequency in Hz for band 3. Must be between and .

microsoft.directx_sdk.xapofx.fxeq_parameters float FrequencyCenter3 float FrequencyCenter3

The boost or decrease to frequencies in band 3. Must be between and

microsoft.directx_sdk.xapofx.fxeq_parameters float Gain3 float Gain3

Width of band 3. Must be between and .

microsoft.directx_sdk.xapofx.fxeq_parameters float Bandwidth3 float Bandwidth3

Parameters for use with the FXMasteringLimiter XAPO.

microsoft.directx_sdk.xapofx.fxmasteringlimiter_parameters FXMASTERINGLIMITER_PARAMETERS FXMASTERINGLIMITER_PARAMETERS
No documentation. microsoft.directx_sdk.xapofx.fxmasteringlimiter_parameters unsigned int Release unsigned int Release No documentation. microsoft.directx_sdk.xapofx.fxmasteringlimiter_parameters unsigned int Loudness unsigned int Loudness

Parameters for use with the FXReverb XAPO.

microsoft.directx_sdk.xapofx.fxreverb_parameters FXREVERB_PARAMETERS FXREVERB_PARAMETERS

Controls the character of the individual wall reflections. Set to minimum value to simulate a hard flat surface and to maximum value to simulate a diffuse surface.Value must be between and .

microsoft.directx_sdk.xapofx.fxreverb_parameters float Diffusion float Diffusion

Size of the room. Value must be between and . Note that physical meaning of RoomSize is subjective and not tied to any particular units. A smaller value will result in reflections reaching the listener more quickly while reflections will take longer with larger values for RoomSize.

microsoft.directx_sdk.xapofx.fxreverb_parameters float RoomSize float RoomSize

The interface for an Audio Processing Object which be used in an XAudio2 effect chain.

microsoft.directx_sdk.ixapo.ixapo IXAPO IXAPO
Returns the registration properties of an XAPO. a structure containing the registration properties the XAPO was created with; use XAPOFree to free the structure. HRESULT IXAPO::GetRegistrationProperties([Out] XAPO_REGISTRATION_PROPERTIES** ppRegistrationProperties) Queries if a specific input format is supported for a given output format. Output format. Input format to check for being supported. If not NULL, and the input format is not supported for the given output format, ppSupportedInputFormat returns a pointer to the closest input format that is supported. Use {{XAPOFree}} to free the returned structure. No documentation. HRESULT IXAPO::IsInputFormatSupported([None] const WAVEFORMATEX* pOutputFormat,[None] const WAVEFORMATEX* pRequestedInputFormat,[Out, Optional] WAVEFORMATEX** ppSupportedInputFormat) Queries if a specific output format is supported for a given input format. [in] Input format. [in] Output format to check for being supported. [out] If not NULL and the output format is not supported for the given input format, ppSupportedOutputFormat returns a pointer to the closest output format that is supported. Use {{XAPOFree}} to free the returned structure. No documentation. HRESULT IXAPO::IsOutputFormatSupported([None] const WAVEFORMATEX* pInputFormat,[None] const WAVEFORMATEX* pRequestedOutputFormat,[Out, Optional] WAVEFORMATEX** ppSupportedOutputFormat) Performs any effect-specific initialization. Effect-specific initialization parameters, may be NULL if DataByteSize is 0. No documentation. HRESULT IXAPO::Initialize([In, Buffer, Optional] const void* pData,[None] UINT32 DataByteSize) Resets variables dependent on frame history. void IXAPO::Reset() Called by XAudio2 to lock the input and output configurations of an XAPO allowing it to do any final initialization before {{Process}} is called on the realtime thread. Array of input structures.pInputLockedParameters may be NULL if InputLockedParameterCount is 0, otherwise it must have InputLockedParameterCount elements. Array of output structures.pOutputLockedParameters may be NULL if OutputLockedParameterCount is 0, otherwise it must have OutputLockedParameterCount elements. No documentation. HRESULT IXAPO::LockForProcess([None] UINT32 InputLockedParameterCount,[In, Buffer, Optional] const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pInputLockedParameters,[None] UINT32 OutputLockedParameterCount,[In, Buffer, Optional] const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pOutputLockedParameters) Deallocates variables that were allocated with the {{LockForProcess}} method. void IXAPO::UnlockForProcess() Runs the XAPO's digital signal processing (DSP) code on the given input and output buffers. [in] Input array of structures. [in, out] Output array of structures. On input, the value of .ValidFrameCount indicates the number of frames that the XAPO should write to the output buffer. On output, the value of .ValidFrameCount indicates the actual number of frames written. TRUE to process normally; FALSE to process thru. See Remarks for additional information. void IXAPO::Process([None] UINT32 InputProcessParameterCount,[In, Buffer, Optional] const XAPO_PROCESS_BUFFER_PARAMETERS* pInputProcessParameters,[None] UINT32 OutputProcessParameterCount,[InOut, Buffer, Optional] XAPO_PROCESS_BUFFER_PARAMETERS* pOutputProcessParameters,[None] BOOL IsEnabled) Returns the number of input frames required to generate the given number of output frames. The number of output frames desired. No documentation. UINT32 IXAPO::CalcInputFrames([None] UINT32 OutputFrameCount) Returns the number of output frames that will be generated from a given number of input frames. The number of input frames. No documentation. UINT32 IXAPO::CalcOutputFrames([None] UINT32 InputFrameCount)

The interface for an Audio Processing Object which be used in an XAudio2 effect chain.

microsoft.directx_sdk.ixapo.ixapo IXAPO IXAPO Native Accessor to an existing AudioProcessor instance
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Returns the registration properties of an XAPO.

Receives a reference to a structure containing the registration properties the XAPO was created with; use XAPOFree to free the structure.

Returns if successful; returns an error code otherwise.

microsoft.directx_sdk.ixapo.ixapo.getregistrationproperties HRESULT IXAPO::GetRegistrationProperties([Out] XAPO_REGISTRATION_PROPERTIES** ppRegistrationProperties) IXAPO::GetRegistrationProperties

Queries if a specific input format is supported for a given output format.

Output format.

Input format to check for being supported.

If not null, and the input format is not supported for the given output format, ppSupportedInputFormat returns a reference to the closest input format that is supported. Use XAPOFree to free the returned structure.

Returns if the format pair is supported. Returns XAPO_E_FORMAT_UNSUPPORTED if the format pair is not supported.

The and IsInputFormatSupported methods allow an XAPO to indicate which audio formats it is capable of processing. If a requested format is not supported, the XAPO should return the closest format that it does support. The closest format should be determined based on frame rate, bit depth, and channel count, in that order of importance. The behavior of IsInputFormatSupported is allowed to change, based on the internal state of the XAPO, but its behavior should remain constant between calls to the and methods.

microsoft.directx_sdk.ixapo.ixapo.isinputformatsupported HRESULT IXAPO::IsInputFormatSupported([In] const WAVEFORMATEX* pOutputFormat,[In] const WAVEFORMATEX* pRequestedInputFormat,[Out, Optional] WAVEFORMATEX** ppSupportedInputFormat) IXAPO::IsInputFormatSupported

Queries if a specific output format is supported for a given input format.

Input format.

Output format to check for being supported.

If not null and the output format is not supported for the given input format, ppSupportedOutputFormat returns a reference to the closest output format that is supported. Use XAPOFree to free the returned structure.

Returns if the format pair is supported. Returns XAPO_E_FORMAT_UNSUPPORTED if the format pair is not supported.

The and IsOutputFormatSupported methods allow an XAPO to indicate which audio formats it is capable of processing. If a requested format is not supported, the XAPO should return the closest format that it does support. The closest format should be determined based on frame rate, bit depth, and channel count, in that order of importance. The behavior of IsOutputFormatSupported is allowed to change, based on the internal state of the XAPO, but its behavior should remain constant between calls to the and methods.

microsoft.directx_sdk.ixapo.ixapo.isoutputformatsupported HRESULT IXAPO::IsOutputFormatSupported([In] const WAVEFORMATEX* pInputFormat,[In] const WAVEFORMATEX* pRequestedOutputFormat,[Out, Optional] WAVEFORMATEX** ppSupportedOutputFormat) IXAPO::IsOutputFormatSupported

Performs any effect-specific initialization.

Effect-specific initialization parameters, may be null if DataByteSize is 0.

Size of pData in bytes, may be 0 if pData is null.

Returns if successful, an error code otherwise.

The contents of pData are defined by a given XAPO. Immutable parameters (constant for the lifetime of the XAPO) should be set in this method. Once initialized, an XAPO cannot be initialized again. An XAPO should be initialized before passing it to XAudio2 as part of an effect chain.

Note??XAudio2 does not call this method, it should be called by the client before passing the XAPO to XAudio2.?
microsoft.directx_sdk.ixapo.ixapo.initialize HRESULT IXAPO::Initialize([In, Buffer, Optional] const void* pData,[In] unsigned int DataByteSize) IXAPO::Initialize

Resets variables dependent on frame history.

Constant and locked parameters such as the input and output formats remain unchanged. Variables set by remain unchanged.

For example, an effect with delay should zero out its delay line during this method, but should not reallocate anything as the XAPO remains locked with a constant input and output configuration.

XAudio2 only calls this method if the XAPO is locked.

This method is called from the realtime thread and should not block.

microsoft.directx_sdk.ixapo.ixapo.reset void IXAPO::Reset() IXAPO::Reset

Called by XAudio2 to lock the input and output configurations of an XAPO allowing it to do any final initialization before Process is called on the realtime thread.

No documentation. No documentation. No documentation. No documentation.

Returns if successful, an error code otherwise.

Once locked, the input and output configuration and any other locked parameters remain constant until UnLockForProcess is called. After an XAPO is locked, further calls to LockForProcess have no effect until the UnLockForProcess function is called.

An XAPO indicates what specific formats it supports through its implementation of the IsInputFormatSupported and IsOutputFormatSupported methods. An XAPO should assert the input and output configurations are supported and that any required effect-specific initialization is complete. The IsInputFormatSupported, IsOutputFormatSupported, and Initialize methods should be used as necessary before calling this method.

Because Process is a nonblocking method, all internal memory buffers required for Process should be allocated in LockForProcess.

Process is never called before LockForProcess returns successfully.

LockForProcess is called directly by XAudio2 and should not be called by the client code.

microsoft.directx_sdk.ixapo.ixapo.lockforprocess HRESULT IXAPO::LockForProcess([In] unsigned int InputLockedParameterCount,[In, Buffer] const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pInputLockedParameters,[In] unsigned int OutputLockedParameterCount,[In, Buffer] const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pOutputLockedParameters) IXAPO::LockForProcess

Deallocates variables that were allocated with the LockForProcess method.

Unlocking an XAPO instance allows it to be reused with different input and output formats.

microsoft.directx_sdk.ixapo.ixapo.unlockforprocess void IXAPO::UnlockForProcess() IXAPO::UnlockForProcess

Runs the XAPO's digital signal processing (DSP) code on the given input and output buffers.

Number of elements in pInputProcessParameters.

Note??XAudio2 currently supports only one input stream and one output stream. ?

Input array of structures.

Number of elements in pOutputProcessParameters.

Note??XAudio2 currently supports only one input stream and one output stream. ?

Output array of structures. On input, the value of . ValidFrameCount indicates the number of frames that the XAPO should write to the output buffer. On output, the value of . ValidFrameCount indicates the actual number of frames written.

TRUE to process normally; to process thru. See Remarks for additional information.

Implementations of this function should not block, as the function is called from the realtime audio processing thread.

All code that could cause a delay, such as format validation and memory allocation, should be put in the method, which is not called from the realtime audio processing thread.

For in-place processing, the pInputProcessParameters parameter will not necessarily be the same as pOutputProcessParameters. Rather, their pBuffer members will point to the same memory.

Multiple input and output buffers may be used with in-place XAPOs, though the input buffer count must equal the output buffer count. For in-place processing when multiple input and output buffers are used, the XAPO may assume the number of input buffers equals the number of output buffers.

In addition to writing to the output buffer, as appropriate, an XAPO is responsible for setting the output stream's buffer flags and valid frame count.

When IsEnabled is , the XAPO should not apply its normal processing to the given input/output buffers during. It should instead pass data from input to output with as little modification possible. Effects that perform format conversion should continue to do so. Effects must ensure transitions between normal and thru processing do not introduce discontinuities into the signal.

When writing a Process method, it is important to note XAudio2 audio data is interleaved, which means data from each channel is adjacent for a particular sample number. For example, if there was a 4-channel wave playing into an XAudio2 source voice, the audio data would be a sample of channel 0, a sample of channel 1, a sample of channel 2, a sample of channel 3, and then the next sample of channels 0, 1, 2, 3, and so on.

microsoft.directx_sdk.ixapo.ixapo.process void IXAPO::Process([In] unsigned int InputProcessParameterCount,[In, Buffer, Optional] const XAPO_PROCESS_BUFFER_PARAMETERS* pInputProcessParameters,[In] unsigned int OutputProcessParameterCount,[In, Buffer] XAPO_PROCESS_BUFFER_PARAMETERS* pOutputProcessParameters,[In] BOOL IsEnabled) IXAPO::Process

Returns the number of input frames required to generate the given number of output frames.

The number of output frames desired.

Returns the number of input frames required.

XAudio2 calls this method to determine what size input buffer an XAPO requires to generate the given number of output frames. This method only needs to be called once while an XAPO is locked. CalcInputFrames is only called by XAudio2 if the XAPO is locked.

This function should not block, because it may be called from the realtime audio processing thread.

microsoft.directx_sdk.ixapo.ixapo.calcinputframes unsigned int IXAPO::CalcInputFrames([In] unsigned int OutputFrameCount) IXAPO::CalcInputFrames

Returns the number of output frames that will be generated from a given number of input frames.

The number of input frames.

Returns the number of output frames that will be produced.

XAudio2 calls this method to determine how large of an output buffer an XAPO will require for a certain number of input frames. CalcOutputFrames is only called by XAudio2 if the XAPO is locked.

This function should not block, because it may be called from the realtime audio processing thread.

microsoft.directx_sdk.ixapo.ixapo.calcoutputframes unsigned int IXAPO::CalcOutputFrames([In] unsigned int InputFrameCount) IXAPO::CalcOutputFrames
Returns the registration properties of an XAPO. a structure containing the registration properties the XAPO was created with; use XAPOFree to free the structure. HRESULT IXAPO::GetRegistrationProperties([Out] XAPO_REGISTRATION_PROPERTIES** ppRegistrationProperties) Queries if a specific input format is supported for a given output format. Output format. Input format to check for being supported. If not NULL, and the input format is not supported for the given output format, ppSupportedInputFormat returns a pointer to the closest input format that is supported. Use {{XAPOFree}} to free the returned structure. No documentation. HRESULT IXAPO::IsInputFormatSupported([None] const WAVEFORMATEX* pOutputFormat,[None] const WAVEFORMATEX* pRequestedInputFormat,[Out, Optional] WAVEFORMATEX** ppSupportedInputFormat) Queries if a specific output format is supported for a given input format. [in] Input format. [in] Output format to check for being supported. [out] If not NULL and the output format is not supported for the given input format, ppSupportedOutputFormat returns a pointer to the closest output format that is supported. Use {{XAPOFree}} to free the returned structure. No documentation. HRESULT IXAPO::IsOutputFormatSupported([None] const WAVEFORMATEX* pInputFormat,[None] const WAVEFORMATEX* pRequestedOutputFormat,[Out, Optional] WAVEFORMATEX** ppSupportedOutputFormat) Performs any effect-specific initialization. Effect-specific initialization parameters, may be NULL if DataByteSize is 0. No documentation. HRESULT IXAPO::Initialize([In, Buffer, Optional] const void* pData,[None] UINT32 DataByteSize) Resets variables dependent on frame history. void IXAPO::Reset() Called by XAudio2 to lock the input and output configurations of an XAPO allowing it to do any final initialization before {{Process}} is called on the realtime thread. Array of input structures.pInputLockedParameters may be NULL if InputLockedParameterCount is 0, otherwise it must have InputLockedParameterCount elements. Array of output structures.pOutputLockedParameters may be NULL if OutputLockedParameterCount is 0, otherwise it must have OutputLockedParameterCount elements. No documentation. HRESULT IXAPO::LockForProcess([None] UINT32 InputLockedParameterCount,[In, Buffer, Optional] const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pInputLockedParameters,[None] UINT32 OutputLockedParameterCount,[In, Buffer, Optional] const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pOutputLockedParameters) Deallocates variables that were allocated with the {{LockForProcess}} method. void IXAPO::UnlockForProcess() Runs the XAPO's digital signal processing (DSP) code on the given input and output buffers. [in] Input array of structures. [in, out] Output array of structures. On input, the value of .ValidFrameCount indicates the number of frames that the XAPO should write to the output buffer. On output, the value of .ValidFrameCount indicates the actual number of frames written. TRUE to process normally; FALSE to process thru. See Remarks for additional information. void IXAPO::Process([None] UINT32 InputProcessParameterCount,[In, Buffer, Optional] const XAPO_PROCESS_BUFFER_PARAMETERS* pInputProcessParameters,[None] UINT32 OutputProcessParameterCount,[InOut, Buffer, Optional] XAPO_PROCESS_BUFFER_PARAMETERS* pOutputProcessParameters,[None] BOOL IsEnabled) Returns the number of input frames required to generate the given number of output frames. The number of output frames desired. No documentation. UINT32 IXAPO::CalcInputFrames([None] UINT32 OutputFrameCount) Returns the number of output frames that will be generated from a given number of input frames. The number of input frames. No documentation. UINT32 IXAPO::CalcOutputFrames([None] UINT32 InputFrameCount)

An optional interface that allows an XAPO to use effect-specific parameters.

microsoft.directx_sdk.ixapoparameters.ixapoparameters IXAPOParameters IXAPOParameters
Sets effect-specific parameters. Effect-specific parameter block. void IXAPOParameters::SetParameters([In, Buffer] const void* pParameters,[None] UINT32 ParameterByteSize) Gets the current values for any effect-specific parameters. [in, out] Receives an effect-specific parameter block. void IXAPOParameters::GetParameters([Out, Buffer] void* pParameters,[None] UINT32 ParameterByteSize)

An optional interface that allows an XAPO to use effect-specific parameters.

microsoft.directx_sdk.ixapoparameters.ixapoparameters IXAPOParameters IXAPOParameters
Initializes a new instance of the class. The native pointer. Performs an explicit conversion from to . (This method is a shortcut to ) The native pointer. The result of the conversion.

Sets effect-specific parameters.

Effect-specific parameter block.

Size of pParameters, in bytes.

The data in pParameters is completely effect-specific and determined by the implementation of the function. The data passed to SetParameters can be used to set the state of the XAPO and control the behavior of the function.

SetParameters can only be called on the real-time audio processing thread; no synchronization between SetParameters and the method is necessary. However, the method may be called from any thread as it adds in the required synchronization to deliver a copy (asynchronously) of the parameters to SetParameters on the real-time thread; no synchronization between and the method is necessary.

microsoft.directx_sdk.ixapoparameters.ixapoparameters.setparameters void IXAPOParameters::SetParameters([In, Buffer] const void* pParameters,[In] unsigned int ParameterByteSize) IXAPOParameters::SetParameters

Gets the current values for any effect-specific parameters.

Receives an effect-specific parameter block.

Size of pParameters, in bytes.

The data in pParameters is completely effect-specific and determined by the implementation of the function. The data returned in pParameters can be used to provide information about the current state of the XAPO.

Unlike SetParameters, XAudio2 does not call this method on the realtime audio processing thread. Thus, the XAPO must protect variables shared with or using appropriate synchronization. The CXAPOParametersBase class is an implementation of and its implementation of GetParameters efficiently handles this synchronization for the user.

XAudio2 calls this method from the method.

This method may block and should never be called from the realtime audio processing thread instead get the current parameters from CXAPOParametersBase::BeginProcess.

microsoft.directx_sdk.ixapoparameters.ixapoparameters.getparameters void IXAPOParameters::GetParameters([Out, Buffer] void* pParameters,[In] unsigned int ParameterByteSize) IXAPOParameters::GetParameters

Defines stream buffer parameters that may change from one call to the next. Used with the Process method.

Although the format and maximum size values of a particular stream buffer are constant, as defined by the structure, the actual memory address of the stream buffer is permitted to change. For constant-bit-rate (CBR) XAPOs, ValidFrameCount is constant and is always equal to the corresponding .MaxFrameCount for this buffer.

Note??Only constant-bit-rate XAPOs are currently supported.?
microsoft.directx_sdk.xapo.xapo_process_buffer_parameters XAPO_PROCESS_BUFFER_PARAMETERS XAPO_PROCESS_BUFFER_PARAMETERS
No documentation. microsoft.directx_sdk.xapo.xapo_process_buffer_parameters void* pBuffer void pBuffer No documentation. microsoft.directx_sdk.xapo.xapo_process_buffer_parameters XAPO_BUFFER_FLAGS BufferFlags XAPO_BUFFER_FLAGS BufferFlags No documentation. microsoft.directx_sdk.xapo.xapo_process_buffer_parameters unsigned int ValidFrameCount unsigned int ValidFrameCount

Defines stream buffer parameters that remain constant while an XAPO is locked. Used with the method.

The byte size of the respective stream buffer must be at least MaxFrameCount ? (pFormat->nBlockAlign) bytes.

microsoft.directx_sdk.xapo.xapo_lockforprocess_parameters XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS
No documentation. microsoft.directx_sdk.xapo.xapo_lockforprocess_parameters const WAVEFORMATEX* pFormat WAVEFORMATEX pFormat No documentation. microsoft.directx_sdk.xapo.xapo_lockforprocess_parameters unsigned int MaxFrameCount unsigned int MaxFrameCount Gets or sets the waveformat. The format.

Describes general characteristics of an XAPO. Used with , CXAPOParametersBase::CXAPOParametersBase, and CXAPOBase::CXAPOBase.

microsoft.directx_sdk.xapo.xapo_registration_properties XAPO_REGISTRATION_PROPERTIES XAPO_REGISTRATION_PROPERTIES
No documentation. microsoft.directx_sdk.xapo.xapo_registration_properties GUID clsid GUID clsid No documentation. microsoft.directx_sdk.xapo.xapo_registration_properties wchar_t FriendlyName[256] wchar_t FriendlyName No documentation. microsoft.directx_sdk.xapo.xapo_registration_properties wchar_t CopyrightInfo[256] wchar_t CopyrightInfo No documentation. microsoft.directx_sdk.xapo.xapo_registration_properties unsigned int MajorVersion unsigned int MajorVersion No documentation. microsoft.directx_sdk.xapo.xapo_registration_properties unsigned int MinorVersion unsigned int MinorVersion No documentation. microsoft.directx_sdk.xapo.xapo_registration_properties XAPO_PROPERTY_TYPE Flags XAPO_PROPERTY_TYPE Flags No documentation. microsoft.directx_sdk.xapo.xapo_registration_properties unsigned int MinInputBufferCount unsigned int MinInputBufferCount No documentation. microsoft.directx_sdk.xapo.xapo_registration_properties unsigned int MaxInputBufferCount unsigned int MaxInputBufferCount No documentation. microsoft.directx_sdk.xapo.xapo_registration_properties unsigned int MinOutputBufferCount unsigned int MinOutputBufferCount No documentation. microsoft.directx_sdk.xapo.xapo_registration_properties unsigned int MaxOutputBufferCount unsigned int MaxOutputBufferCount AudioProcessor interface for XAudio27. Base AudioProcessor class that implements methods from . This class is also providing its parameter through a generic. type of the parameter for this AudioProcessor Return parameters Gets the input format locked. The input format locked. Gets the output format locked. The output format locked. Gets the max frame count locked. The max frame count locked. Returns the registration properties of an XAPO. a structure containing the registration properties the XAPO was created with; use XAPOFree to free the structure. HRESULT IXAPO::GetRegistrationProperties([Out] XAPO_REGISTRATION_PROPERTIES** ppRegistrationProperties) Queries if a specific input format is supported for a given output format. Output format. Input format to check for being supported. If not NULL, and the input format is not supported for the given output format, ppSupportedInputFormat returns a pointer to the closest input format that is supported. Use {{XAPOFree}} to free the returned structure. No documentation. HRESULT IXAPO::IsInputFormatSupported([None] const WAVEFORMATEX* pOutputFormat,[None] const WAVEFORMATEX* pRequestedInputFormat,[Out, Optional] WAVEFORMATEX** ppSupportedInputFormat) Queries if a specific output format is supported for a given input format. [in] Input format. [in] Output format to check for being supported. [out] If not NULL and the output format is not supported for the given input format, ppSupportedOutputFormat returns a pointer to the closest output format that is supported. Use {{XAPOFree}} to free the returned structure. No documentation. HRESULT IXAPO::IsOutputFormatSupported([None] const WAVEFORMATEX* pInputFormat,[None] const WAVEFORMATEX* pRequestedOutputFormat,[Out, Optional] WAVEFORMATEX** ppSupportedOutputFormat) Performs any effect-specific initialization. Effect-specific initialization parameters, may be NULL if DataByteSize is 0. No documentation. HRESULT IXAPO::Initialize([In, Buffer, Optional] const void* pData,[None] UINT32 DataByteSize) Resets variables dependent on frame history. void IXAPO::Reset() Called by XAudio2 to lock the input and output configurations of an XAPO allowing it to do any final initialization before {{Process}} is called on the realtime thread. Array of input structures.pInputLockedParameters may be NULL if InputLockedParameterCount is 0, otherwise it must have InputLockedParameterCount elements. Array of output structures.pOutputLockedParameters may be NULL if OutputLockedParameterCount is 0, otherwise it must have OutputLockedParameterCount elements. No documentation. HRESULT IXAPO::LockForProcess([None] UINT32 InputLockedParameterCount,[In, Buffer, Optional] const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pInputLockedParameters,[None] UINT32 OutputLockedParameterCount,[In, Buffer, Optional] const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pOutputLockedParameters) Deallocates variables that were allocated with the {{LockForProcess}} method. void IXAPO::UnlockForProcess() Runs the XAPO's digital signal processing (DSP) code on the given input and output buffers. [in] Input array of structures. [in, out] Output array of structures. On input, the value of .ValidFrameCount indicates the number of frames that the XAPO should write to the output buffer. On output, the value of .ValidFrameCount indicates the actual number of frames written. TRUE to process normally; FALSE to process thru. See Remarks for additional information. void IXAPO::Process([None] UINT32 InputProcessParameterCount,[In, Buffer, Optional] const XAPO_PROCESS_BUFFER_PARAMETERS* pInputProcessParameters,[None] UINT32 OutputProcessParameterCount,[InOut, Buffer, Optional] XAPO_PROCESS_BUFFER_PARAMETERS* pOutputProcessParameters,[None] BOOL IsEnabled) Returns the number of input frames required to generate the given number of output frames. The number of output frames desired. No documentation. UINT32 IXAPO::CalcInputFrames([None] UINT32 OutputFrameCount) Returns the number of output frames that will be generated from a given number of input frames. The number of input frames. No documentation. UINT32 IXAPO::CalcOutputFrames([None] UINT32 InputFrameCount) Sets effect-specific parameters. Effect-specific parameter block. void IXAPOParameters::SetParameters([In, Buffer] const void* pParameters,[None] UINT32 ParameterByteSize) Gets the current values for any effect-specific parameters. [in, out] Receives an effect-specific parameter block. void IXAPOParameters::GetParameters([Out, Buffer] void* pParameters,[None] UINT32 ParameterByteSize) Implements this class to call an existing unmanaged AudioProcessor which supports parameter. the parameter type of this AudioProcessor Initializes a new instance of the class. The device. Update the Native Pointer. Rebuild ParameterProviderNative. Get or Set the parameters for this AudioProcessor Internal AudioProcessorShadow IXAPO GUID Return a pointer to the unmanaged version of this callback. The callback. A pointer to a shadow c++ callback HRESULT IXAPO::GetRegistrationProperties([Out] XAPO_REGISTRATION_PROPERTIES** ppRegistrationProperties) HRESULT IXAPO::IsInputFormatSupported([None] const WAVEFORMATEX* pOutputFormat,[None] const WAVEFORMATEX* pRequestedInputFormat,[Out, Optional] WAVEFORMATEX** ppSupportedInputFormat) HRESULT IXAPO::IsOutputFormatSupported([None] const WAVEFORMATEX* pInputFormat,[None] const WAVEFORMATEX* pRequestedOutputFormat,[Out, Optional] WAVEFORMATEX** ppSupportedOutputFormat) HRESULT IXAPO::Initialize([In, Buffer, Optional] const void* pData,[None] UINT32 DataByteSize) void IXAPO::Reset() HRESULT IXAPO::LockForProcess([None] UINT32 InputLockedParameterCount,[In, Buffer, Optional] const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pInputLockedParameters,[None] UINT32 OutputLockedParameterCount,[In, Buffer, Optional] const XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS* pOutputLockedParameters) Deallocates variables that were allocated with the {{LockForProcess}} method. void IXAPO::UnlockForProcess() void IXAPO::Process([None] UINT32 InputProcessParameterCount,[In, Buffer, Optional] const XAPO_PROCESS_BUFFER_PARAMETERS* pInputProcessParameters,[None] UINT32 OutputProcessParameterCount,[InOut, Buffer, Optional] XAPO_PROCESS_BUFFER_PARAMETERS* pOutputProcessParameters,[None] BOOL IsEnabled) Returns the number of input frames required to generate the given number of output frames. This pointer The number of output frames desired. No documentation. UINT32 IXAPO::CalcInputFrames([None] UINT32 OutputFrameCount) Returns the number of output frames that will be generated from a given number of input frames. This Pointer The number of input frames. No documentation. UINT32 IXAPO::CalcOutputFrames([None] UINT32 InputFrameCount) AudioProcessor interface for XAudio27. Internal AudioProcessorShadow IXAPOParameters Return a pointer to the unmanaged version of this callback. The callback. A pointer to a shadow c++ callback Sets effect-specific parameters. This pointer Effect-specific parameter block. size of the parameters void IXAPOParameters::SetParameters([In, Buffer] const void* pParameters,[None] UINT32 ParameterByteSize) Gets the current values for any effect-specific parameters. This pointer [in, out] Receives an effect-specific parameter block. size of the parameters void IXAPOParameters::GetParameters([Out, Buffer] void* pParameters,[None] UINT32 ParameterByteSize)