1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "media/audio/audio_features.h"
6 #include "base/feature_list.h"
7 #include "build/chromeos_buildflags.h"
8 
9 namespace features {
10 
11 // When the audio service in a separate process, kill it when a hang is
12 // detected. It will be restarted when needed.
13 const base::Feature kAudioServiceOutOfProcessKillAtHang{
14   "AudioServiceOutOfProcessKillAtHang",
15 #if defined(OS_WIN) || defined(OS_MAC) || defined(OS_LINUX) || defined(OS_BSD) || \
16     defined(OS_CHROMEOS)
17       base::FEATURE_ENABLED_BY_DEFAULT
18 #else
19       base::FEATURE_DISABLED_BY_DEFAULT
20 #endif
21 };
22 
23 // If enabled, base::DumpWithoutCrashing is called whenever an audio service
24 // hang is detected.
25 const base::Feature kDumpOnAudioServiceHang{"DumpOnAudioServiceHang",
26                                             base::FEATURE_DISABLED_BY_DEFAULT};
27 
28 #if defined(OS_ANDROID)
29 // Enables loading and using AAudio instead of OpenSLES on compatible devices,
30 // for audio output streams.
31 const base::Feature kUseAAudioDriver{"UseAAudioDriver",
32                                      base::FEATURE_ENABLED_BY_DEFAULT};
33 #endif
34 
35 #if BUILDFLAG(IS_ASH) || BUILDFLAG(IS_LACROS)
36 const base::Feature kCrOSSystemAEC{"CrOSSystemAEC",
37                                    base::FEATURE_ENABLED_BY_DEFAULT};
38 const base::Feature kCrOSSystemAECDeactivatedGroups{
39     "CrOSSystemAECDeactivatedGroups", base::FEATURE_ENABLED_BY_DEFAULT};
40 #endif
41 
42 #if defined(OS_MAC) || BUILDFLAG(IS_ASH)
43 const base::Feature kForceEnableSystemAec{"ForceEnableSystemAec",
44                                           base::FEATURE_DISABLED_BY_DEFAULT};
45 #endif
46 
47 #if defined(OS_WIN)
48 const base::Feature kAllowIAudioClient3{"AllowIAudioClient3",
49                                         base::FEATURE_ENABLED_BY_DEFAULT};
50 #endif
51 }  // namespace features
52