This topic provides an overview of common audio concepts with which an audio developer should be familiar. This topic provides information on key XAudio2 concepts, XAudio2 versions, and the RIFF audio format. The topic provides a list of the audio programming features supported by XAudio2. For game developers who want to add sound effects and background music to their modern games, XAudio2 offers an audio graph and mixing engine with low-latency and support for dynamic buffers, synchronous sample-accurate playback, and implicit source rate conversion. XAudio2 is the audio mixing library for DirectX, and is primarily intended for developing high performance audio engines for games. DirectX audio development roadmap XAudio2 conceptual resources If you are developing a complex game that simulates a world, or which demands a cinematic style, consider using 3D positional audio techniques to really draw the player in. Positional 3D audio can add a level of immersion beyond that provided by 3D graphics. The effort you spend designing and developing your game's audio profile will be well worth it. Music and sound define a game's personality, and establish the main motive that defines the game and makes it stand apart from other similar games. Many gamers can recall a mediocre game elevated to legendary status just because of a memorable soundtrack, or great voice work and sound mixing, or overall stellar audio production. You can submix that sound into the audio stream for playback to the player, or you can use it to take a specific in-game action, like awakening an AI guard marked as a listener.Īudio is a tremendously important part of game design and development. A sound listener is often the player, or perhaps an AI entity in a more advanced game, that processes the sounds received from a listener. You specify emitters by world coordinates. In XAudio2, sound emitters are locations that emit a sound, be it a mere blip of a background noise or a snarling rock track played by an in-game jukebox.
How to create your own game sounds professional#
Higher rates may be appropriate for professional audio applications, but you probably don't need them unless your game demands professional fidelity sound. If you don't need high fidelity for a sound, you can choose a lower sample rate. The sample rate for CD quality is 44.1 Khz (44100 Hz). Sounds can be sampled at different rates, and sounds sampled at a lower rate have much poorer fidelity. Fidelity can vary across compression schemes and bit rates, so experiment with them to find what works best for your game. The more a sample is compressed - typically designated by its bit rate, where the lower the bit rate is, the more lossy the compression - the worse fidelity it has. There are uncompressed formats, like WAV, and compressed formats like MP3 and OGG. Music and sound effects can be stored in a variety of digital formats for your game. Submixing is the process of combining several discrete signals, such as the component sounds of an engine noise, and creating a voice. Mixing is the process of combining several discrete voices, such as the sound effects and the background audio that are played back in a scene, into a single stream.Mastering voices write audio data to an audio device. Submix and mastering voices mix the audio from all voices feeding them, and operate on the result. Source and submix voices send their output to one or more submix or mastering voices. Source voices operate on audio data provided by the client. There are 3 types of XAudio2 voice objects: source, submix, and mastering voices. Voices are the submixed composites of two or more signals.By programming to the DSPs, you can alter your game's sound effects and music with as little or as much complexity as you need. They can transform signals, or combine them, or filter them. The digital signal processors (DSPs) that process them are like the pixel shaders of game audio. Signals are the basic unit of sound programming, analogous to pixels in graphics.Here are a few audio programming concepts we use in this section. Microsoft Media Foundation is designed for the playback of media files and streams, both audio and video, but can also be used in games, and is particularly useful for cinematic scenes or non-interactive components of your game. You can also implement simple sounds and music playback with Microsoft Media Foundation. XAudio2 is a low-level audio library that provides a signal processing and mixing foundation for games, and it supports a variety of formats.
How to create your own game sounds how to#
Learn how to develop and incorporate music and sounds into your DirectX game, and how to process the audio signals to create dynamic and positional sounds.įor audio programming, we recommend using either the XAudio2 library in DirectX, or the Windows Runtime Audio graphs APIs.