output/wasapi: rename OpenDevice() to ChooseDevice()

OpenDevice was a confusing name because it does not actually open a
device.
This commit is contained in:
Max Kellermann 2021-03-10 17:29:03 +01:00
parent 3e93c392d7
commit 3e484637f9
1 changed files with 4 additions and 4 deletions

View File

@ -253,7 +253,7 @@ public:
com_worker = std::make_shared<COMWorker>();
try {
com_worker->Async([&]() { OpenDevice(); }).get();
com_worker->Async([&]() { ChooseDevice(); }).get();
} catch (...) {
com_worker.reset();
throw;
@ -288,7 +288,7 @@ private:
void DoDisable() noexcept;
void DoOpen(AudioFormat &audio_format);
void OpenDevice();
void ChooseDevice();
bool TryFormatExclusive(const AudioFormat &audio_format);
void FindExclusiveFormatSupported(AudioFormat &audio_format);
void FindSharedFormatSupported(AudioFormat &audio_format);
@ -445,7 +445,7 @@ WasapiOutput::DoOpen(AudioFormat &audio_format)
if (GetState(*device) != DEVICE_STATE_ACTIVE) {
device.reset();
OpenDevice();
ChooseDevice();
}
client = Activate<IAudioClient>(*device);
@ -693,7 +693,7 @@ WasapiOutput::Cancel() noexcept
/// run inside COMWorkerThread
void
WasapiOutput::OpenDevice()
WasapiOutput::ChooseDevice()
{
ComPtr<IMMDeviceEnumerator> enumerator;
enumerator.CoCreateInstance(__uuidof(MMDeviceEnumerator), nullptr,