xaudio2: audio building blocks for the future brian schmidt program manager xna professional game...
TRANSCRIPT
XAudio2: Audio Building Blocks for the FutureBrian SchmidtProgram ManagerXNA Professional Game PlatformMicrosoft
Game Audio Pipelines
DirectSound
Core AudioXMA Hardware andXbox 360 System
XAudio
Windows(Vista, XP)
Xbox 360
WaveData
WaveData
Game Audio Pipelines
DirectSound
Core AudioXMA Hardware andXbox 360 System
XAudio
XACT Runtime
XACT Runtime
XACT Content
XACT Content
Windows(Vista, XP)
Xbox 360
WaveData
WaveData
Game Audio Pipelines
XAudio 2
Core AudioXMA Hardware andXbox 360 System
XAudio 2
XACT Runtime
XACT Runtime
XACT Content
XACT Content
Windows(Vista, XP)
Xbox 360
WaveData
WaveData
XAudio2
XAudio 2
Core AudioXMA Hardware andXbox 360 System
XAudio 2
XACT Runtime
XACT Runtime
XACT Content
XACT Content
Windows(Vista, XP)
Xbox 360
WaveData
WaveData
(XACT 3)(XACT 3)
Xbox 360 GameXbox 360 Game
XAudio2XAudio2
Xbox 360 Audio Output HardwareXbox 360 Audio Output Hardware
(XACT 3)(XACT 3)
Windows GameWindows Game
XAudio2XAudio2
WASAPI (Vista)/DirectSound (XP)WASAPI (Vista)/DirectSound (XP)XMA DecoderXMA Decoder
Drivers/Audio Output HardwareDrivers/Audio Output Hardware
Bit of History…
1995: DirectSound released“Bleeding Edge” CPU:
Pentium, 133 MHz (no MMX)
DirectSound3D API introduced (1997)ISA sound cards w/ on-board memory“wave file is a sound”
Fast Forward to 2008
Multicore, 3+ GHz CPUsHD motherboard audio
Surround SoundHigh fidelity
SIMD floating-point architecturesHigh-level audio toolsComplex sounds and processing
XAudio2 is…A new API for code-driven, low-level audio processing for games
Replacement for DirectSound for gaming applications for Windows XP and Windows VistaReplacement for XAudio for Xbox 360 games
Based on Xbox 360 XAudio architectureXAudio2 API will be familiar to XAudio developer, but not just a recompileIncorporates feedback on XAudio API
XAudio2 Design GoalsFocus exclusively on game scenariosSimple – Just a few methods cover basic scenarios
Greater emphasis on digital signal processing (DSP FX)
Write and integrate your own DSP FX easilySubmixing
Allow more flexibility for 3DSupport Microsoft gaming platforms
XAudio2 FeaturesSeparation of sound data from “voice”
Point XAudio2 at some sound data and Play()
SubmixingMultirate processingArbitrary loop pointPer-voice filteringProgrammable voices
Effects processing, SRCSoftware DSPEnhanced Surround Sound supportNative Compressed Data Support
XMA on Xbox 360xWMA on Windows and Xbox 360ADPCM on WindowsExtensible
XAudio2 ComponentsSource Voice
Reads data from XMA decoder /ADPCM or PCM xWMASample Rate Conversion, Volume, loop, N-way PanCan insert arbitrary FXMultichannel support
Submix Voice(s)Input from one or more voices & submixes them togetherN-way PanCan insert arbitrary FXCan send to additional submix voices
Mastering VoiceTakes final N channel mix as inputCan insert arbitrary FX (compression, etc.)Outputs data to system
XAudio2 Overall Architecture
Source Voice
N channel
MIXBuffers
Mastering Voice Output DeviceSubmixVoice
Source Voice
Source Voice
Source Voice
Memory
XAudio2 Source VoiceSource Voice
SRC FX1 PannerFXN
XMA/ADPCMPCM
MemoryTo MIX buffers
Or submix voice
FX PannerFX
From Source or Submix
VoiceTo MIX Buffers
(or submix voice)
+ (SRC)
XAudio2 Submix Voice
Submix Voices
Useful for summing sounds and applying single DSP and/or 3D panning on the aggregate mixAlso used for shared “send to” effects
Reverb, etc.
Can be used to reduce CPU usage by creating a “low rate submix”
Source Voice
N channel
MIXBuffers
Mastering VoiceN Channel Mix to
EncoderSubmixVoice
Source Voice
Source Voice
Source Voice
Memory
Example: Submixing Voices
Mastering VoiceMastering Voice
Submix Voice withGlobal Reverb
Submix Voice withGlobal Reverb
Submix VoiceSubmix Voice
Source VoiceSource Voice
Source VoiceSource Voice
Source VoiceSource Voice
Example: Reverb Sends
Example: Low Rate Submix
Music48kHz
Mastering Voice48kHz
SFX Submix22kHz
Music48kHz
SFXMemory
SFX
SFX
SFX
Dialog
3D/Surround Sound3D Audio handled differently from DirectSound3DXAudio2 provides enhanced Surround support
Explicit multichannel panning/mapping
3D handled as a separate, replaceable library
XAudio2 takes multichannel speaker volumesX3DAudio library transforms source/listener coordinates into speaker volumes and other synthesis parameters
-5.1 Speaker Volumes-DSP Data-Intermediate calculations
-5.1 Speaker Volumes-DSP Data
Game Object Geometry Data
Game EngineGame Engine
XAudio2XAudio2
X3DAudioX3DAudio
DSP Audio Effects
XAudio2 uses new cross-platform DSP model, xAPO (Audio Processing Object)Simplification of APO model used for Windows Vista system effectsCan use supplied xAPOs or write your own
XAudio 2 DemoXAudio 2 Demo
Additional Enhancements Beyond Xbox 360 XAudio APIBuilt-in filter per voice
Can set overall sampling rateSubmixes can have their own sampling rate
Reduce CPU usage
Non-blocking APIDeferred commandsNot limited to 6-channel source dataImproved DSP architecture
Libraries Built on XAudio2Several libraries are built on top of XAudio2These are updated as well
Follow same Beta/RTM schedule
XACT 3XACT running on XAudio2Windows and Xbox
XMedia2 (XMV)Xbox 360 movie player running on XAudio2
XHV2Xbox 360 voice library running on XAudio2
Release Schedule
XAudio2 is available nowBeta/Unapproved in November SDK/XDK
RTM/Approved in March 2008Update in June 2008 SDK/XDK
SummaryXAudio2 provides all-software audio pipeline for Windows and Xbox 360
Provides consistent experience across hardware configurations
Based on Xbox 360 XAudio API, with enhancementsAddresses long-standing issues with DirectSound
Buffer/Data/AllocationsFlexible DSP, submixing, signal processing
Cross-pollination of Xbox 360 and Windows Technologies
Call to action
Windows GamesMove your DirectSound game to XAudio2
Xbox 360 GamesMove your XAudio game to XAudio2
Everybody!Please give us feedbackUse connect.microsoft.com for status, newsgroups, etc.
© 2008 Microsoft Corporation. All rights reserved.This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
http://www.xna.com