Commit 5e8d8448 authored by Guido Urdaneta's avatar Guido Urdaneta Committed by Commit Bot

Remove the dependency of CoreAudioUtilMac from AudioManager.

The dependency was used to DCHECK that Core Audio functions run on
the same task runner as the AudioManager.
However, with the new audio service running on a separate process, the
device monitor on the browser process fails the DCHECKs because there
is no AudioManager.

This CL is to be followed by a CL that moves monitoring to the audio
service. Still, such monitoring need not depend on the AudioManager,
so the removal of this dependency holds in that case as well.

Bug: 843106
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I988b3bf47219556117ed0ea7545281237db5bdee
Reviewed-on: https://chromium-review.googlesource.com/1059653
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Olga Sharonova <olka@chromium.org>
Reviewed-by: default avatarOlga Sharonova <olka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558688}
parent fafcfe1a
......@@ -10,7 +10,6 @@
#include "base/single_thread_task_runner.h"
#include "base/strings/string_util.h"
#include "base/strings/sys_string_conversions.h"
#include "media/audio/audio_manager.h"
namespace media {
namespace core_audio_mac {
......@@ -25,7 +24,6 @@ AudioObjectPropertyScope InputOutputScope(bool is_input) {
base::Optional<std::string> GetDeviceStringProperty(
AudioObjectID device_id,
AudioObjectPropertySelector property_selector) {
DCHECK(AudioManager::Get()->GetTaskRunner()->BelongsToCurrentThread());
CFStringRef property_value = nullptr;
UInt32 size = sizeof(property_value);
AudioObjectPropertyAddress property_address = {
......@@ -55,7 +53,6 @@ base::Optional<uint32_t> GetDeviceUint32Property(
AudioObjectID device_id,
AudioObjectPropertySelector property_selector,
AudioObjectPropertyScope property_scope) {
DCHECK(AudioManager::Get()->GetTaskRunner()->BelongsToCurrentThread());
AudioObjectPropertyAddress property_address = {
property_selector, property_scope, kAudioObjectPropertyElementMaster};
UInt32 property_value;
......@@ -72,7 +69,6 @@ base::Optional<uint32_t> GetDeviceUint32Property(
uint32_t GetDevicePropertySize(AudioObjectID device_id,
AudioObjectPropertySelector property_selector,
AudioObjectPropertyScope property_scope) {
DCHECK(AudioManager::Get()->GetTaskRunner()->BelongsToCurrentThread());
AudioObjectPropertyAddress property_address = {
property_selector, property_scope, kAudioObjectPropertyElementMaster};
UInt32 size = 0;
......@@ -91,7 +87,6 @@ uint32_t GetDevicePropertySize(AudioObjectID device_id,
std::vector<AudioObjectID> GetAudioDeviceIDs(
AudioObjectID audio_object_id,
AudioObjectPropertySelector property_selector) {
DCHECK(AudioManager::Get()->GetTaskRunner()->BelongsToCurrentThread());
AudioObjectPropertyAddress property_address = {
property_selector, kAudioObjectPropertyScopeGlobal,
kAudioObjectPropertyElementMaster};
......
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