Don't start WASAPI render thread until setup completes.
Creating the render thread before setting up the |audio_client_|
may lead to race conditions when repeatedly starting and stopping
a stream.
With this patch, nothing touches |audio_client_| until IAudioClient
triggers the render event for data.
As a bonus, it fixes a destruction issue where |audio_clock| was
being destructed on the wrong thread (render vs audio), see docs:
http://msdn.microsoft.com/en-us/library/windows/desktop/dd370873.aspx
BUG=310838
TEST=none
Review URL: https://codereview.chromium.org/89663004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237694 0039d316-1c4b-4281-b951-d872f2087c98
2 files changed