Fixes CoreAudioUtil::CreateDevice for loopback mode.

Takes loopback devices into account in CoreAudioUtil::CreateDevice()
which previously failed with E_INVALIDARG when a loopback device was
selected.

This change might also have positive side effects for loopack mode when used
in combination with multi-channel input devices since the input channel
format will now be correct.

Also fixes the presubmit error below:

** Presubmit ERRORS **
Banned functions were used.
    media\audio\win\core_audio_util_win.cc:461:
      Improper use of Microsoft::WRL::ComPtr<T>::GetAddressOf() has been
      implicated in a few leaks. Use operator& instead.

BUG=938938
TEST=WinAudioInputTest.WASAPIAudioInputStreamLoopback

Change-Id: I4e2f0add6dc743dd0d10a476ff67f46e66a3dec8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1578746
Commit-Queue: Henrik Andreasson <henrika@chromium.org>
Reviewed-by: Henrik Grunell <grunell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#654005}
2 files changed