Quantcast
Channel: directxtk Wiki Rss Feed
Viewing all articles
Browse latest Browse all 874

Updated Wiki: AudioEmitter

$
0
0
AudioEmitter is a helper object derived from X3DAUDIO_EMITTER used by SoundEffectInstance's Apply3D method.

See AudioListener.

Initialization

The default constructor creates a point emitter located at 0,0,0 facing +z and an up vector of +y for a mono source.

Helpers

In addition to setting the members of X3DAUDIO_EMITTER directly, these helper functions are provided:
  • SetPosition (FXVMECTOR) or (XMFLOAT3)
Sets the Position of the emitter.
  • SetVelocity (FXMVECTOR) or (XMFLOAT3)
Sets the Velocity of the emitter.
  • SetOrientation (FXMVECTOR forward, FXVMECTOR up) or (XMFLOAT3 forward, XMFLOAT3 up)
  • SetOrientationFromQuaternion ( FXMVECTOR )
Sets the OrientFront/OrientTop of the emitter.
  • Update ( FXMVECTOR newPos, XMVECTOR upDir, float dt )
Computes a direction and velocity for the emitter based on the existing Position and the newPos, updating the OrientFront/OrientTop to match, and then setting the Position to the newPos. If dt is 0, the update is skipped.

Further reading

http://msdn.microsoft.com/en-us/library/windows/desktop/microsoft.directx_sdk.x3daudio.x3daudio_emitter.aspx

Viewing all articles
Browse latest Browse all 874

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>