Index: media/audio/audio_system_impl.cc |
diff --git a/media/audio/audio_system_impl.cc b/media/audio/audio_system_impl.cc |
index a6c51a67d863a6086b33b9e470c97d1b8ebf4471..fdffa70fda0f70cbce1e60457eb2044e9287a254 100644 |
--- a/media/audio/audio_system_impl.cc |
+++ b/media/audio/audio_system_impl.cc |
@@ -7,7 +7,6 @@ |
#include "base/memory/ptr_util.h" |
#include "base/single_thread_task_runner.h" |
#include "base/task_runner_util.h" |
-#include "media/audio/audio_device_description.h" |
#include "media/audio/audio_manager.h" |
// Using base::Unretained for |audio_manager_| is safe since it is deleted after |
@@ -22,27 +21,11 @@ |
DCHECK(audio_manager->GetTaskRunner()->BelongsToCurrentThread()); |
// TODO(olka): remove this when AudioManager::GetInputStreamParameters() |
- // returns invalid parameters if the device is not found. |
+ // works this way on all the platforms. |
if (!audio_manager->HasAudioInputDevices()) |
return AudioParameters(); |
return audio_manager->GetInputStreamParameters(device_id); |
-} |
- |
-AudioParameters GetOutputParametersOnDeviceThread( |
- AudioManager* audio_manager, |
- const std::string& device_id) { |
- DCHECK(audio_manager->GetTaskRunner()->BelongsToCurrentThread()); |
- |
- // TODO(olka): remove this when |
- // AudioManager::Get[Default]OutputStreamParameters() returns invalid |
- // parameters if the device is not found. |
- if (!audio_manager->HasAudioOutputDevices()) |
- return AudioParameters(); |
- |
- return media::AudioDeviceDescription::IsDefaultDevice(device_id) |
- ? audio_manager->GetDefaultOutputStreamParameters() |
- : audio_manager->GetOutputStreamParameters(device_id); |
} |
} // namespace |
@@ -79,22 +62,6 @@ |
std::move(on_params_cb)); |
} |
-void AudioSystemImpl::GetOutputStreamParameters( |
- const std::string& device_id, |
- OnAudioParamsCallback on_params_cb) const { |
- if (GetTaskRunner()->BelongsToCurrentThread()) { |
- GetTaskRunner()->PostTask( |
- FROM_HERE, base::Bind(on_params_cb, GetOutputParametersOnDeviceThread( |
- audio_manager_, device_id))); |
- return; |
- } |
- base::PostTaskAndReplyWithResult( |
- GetTaskRunner(), FROM_HERE, |
- base::Bind(&GetOutputParametersOnDeviceThread, |
- base::Unretained(audio_manager_), device_id), |
- std::move(on_params_cb)); |
-} |
- |
void AudioSystemImpl::HasInputDevices(OnBoolCallback on_has_devices_cb) const { |
if (GetTaskRunner()->BelongsToCurrentThread()) { |
GetTaskRunner()->PostTask( |