microsoft / DirectXTK

The DirectX Tool Kit (aka DirectXTK) is a collection of helper classes for writing DirectX 11.x code in C++
https://walbourn.github.io/directxtk/
MIT License
2.57k stars 511 forks source link

Quick documentation update for Audio #317

Closed cpyburn closed 2 years ago

cpyburn commented 2 years ago

Just a little note, nothing I couldn't figure out on my own in 5 minutes, but was confused at first, does dt mean distance, does it mean delta time, and so on... https://github.com/microsoft/DirectXTK/wiki/AudioEmitter never tells you what dt means in the Update method. I eventually found it in the link Related tutorial: Using positional audio. Maybe you use dt all over the place in other classes and explain it there, but for me, I was only here to use the audio.

In Game.cpp, add to the TODO of Update:

m_emitter.Update(m_position, Vector3::Up, static_cast(timer.GetElapsedSeconds())); if (m_soundSource) { m_soundSource->Apply3D(m_listener, m_emitter); }

walbourn commented 2 years ago

Thanks for the feedback. I've updated the wiki pages:

https://github.com/microsoft/DirectXTK/wiki/AudioEmitter

https://github.com/microsoft/DirectXTK/wiki/AudioListener