Releases a reference to the XAudio2 object.
This method has no parameters.
Always returns 0.
When the final Release is called on a given XAudio2 object, all voice objects that are associated with it are destroyed. Any pointers to these objects that are still held by the client become invalid immediately. Any calls that are made to them cause undefined behavior. The audio processing engine is also stopped. This is so that after Release is returned, the client can safely free any data that is referenced by the graph (for example, audio source buffers or callback handling objects).
Release is a synchronous call. While glitching should not occur (since it only briefly takes the processing lock), a title can avoid potential thread wait times by calling this method in an XAudio2 callback.
Windows 8, Windows Phone 8 (XAudio 2.8); DirectX SDK (XAudio 2.7)