Commit 3e484637 authored by Max Kellermann's avatar Max Kellermann

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

OpenDevice was a confusing name because it does not actually open a device.
parent 3e93c392
...@@ -253,7 +253,7 @@ public: ...@@ -253,7 +253,7 @@ public:
com_worker = std::make_shared<COMWorker>(); com_worker = std::make_shared<COMWorker>();
try { try {
com_worker->Async([&]() { OpenDevice(); }).get(); com_worker->Async([&]() { ChooseDevice(); }).get();
} catch (...) { } catch (...) {
com_worker.reset(); com_worker.reset();
throw; throw;
...@@ -288,7 +288,7 @@ private: ...@@ -288,7 +288,7 @@ private:
void DoDisable() noexcept; void DoDisable() noexcept;
void DoOpen(AudioFormat &audio_format); void DoOpen(AudioFormat &audio_format);
void OpenDevice(); void ChooseDevice();
bool TryFormatExclusive(const AudioFormat &audio_format); bool TryFormatExclusive(const AudioFormat &audio_format);
void FindExclusiveFormatSupported(AudioFormat &audio_format); void FindExclusiveFormatSupported(AudioFormat &audio_format);
void FindSharedFormatSupported(AudioFormat &audio_format); void FindSharedFormatSupported(AudioFormat &audio_format);
...@@ -445,7 +445,7 @@ WasapiOutput::DoOpen(AudioFormat &audio_format) ...@@ -445,7 +445,7 @@ WasapiOutput::DoOpen(AudioFormat &audio_format)
if (GetState(*device) != DEVICE_STATE_ACTIVE) { if (GetState(*device) != DEVICE_STATE_ACTIVE) {
device.reset(); device.reset();
OpenDevice(); ChooseDevice();
} }
client = Activate<IAudioClient>(*device); client = Activate<IAudioClient>(*device);
...@@ -693,7 +693,7 @@ WasapiOutput::Cancel() noexcept ...@@ -693,7 +693,7 @@ WasapiOutput::Cancel() noexcept
/// run inside COMWorkerThread /// run inside COMWorkerThread
void void
WasapiOutput::OpenDevice() WasapiOutput::ChooseDevice()
{ {
ComPtr<IMMDeviceEnumerator> enumerator; ComPtr<IMMDeviceEnumerator> enumerator;
enumerator.CoCreateInstance(__uuidof(MMDeviceEnumerator), nullptr, enumerator.CoCreateInstance(__uuidof(MMDeviceEnumerator), nullptr,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment