| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 |
| 11 | #ifndef API_AUDIO_OPTIONS_H_ |
| 12 | #define API_AUDIO_OPTIONS_H_ |
| 13 |
| 14 | #include <stdint.h> |
| 15 |
| 16 | #include <string> |
| 17 |
| 18 | #include "absl/types/optional.h" |
| 19 | #include "rtc_base/system/rtc_export.h" |
| 20 |
| 21 | namespace cricket { |
| 22 |
| 23 | // Options that can be applied to a VoiceMediaChannel or a VoiceMediaEngine. |
| 24 | // Used to be flags, but that makes it hard to selectively apply options. |
| 25 | // We are moving all of the setting of options to structs like this, |
| 26 | // but some things currently still use flags. |
| 27 | struct RTC_EXPORT AudioOptions { |
| 28 | AudioOptions(); |
| 29 | ~AudioOptions(); |
| 30 | void SetAll(const AudioOptions& change); |
| 31 |
| 32 | bool operator==(const AudioOptions& o) const; |
| 33 | bool operator!=(const AudioOptions& o) const { return !(*this == o); } |
| 34 |
| 35 | std::string ToString() const; |
| 36 |
| 37 | // Audio processing that attempts to filter away the output signal from |
| 38 | // later inbound pickup. |
| 39 | absl::optional<bool> echo_cancellation; |
| 40 | #if defined(WEBRTC_IOS) |
| 41 | // Forces software echo cancellation on iOS. This is a temporary workaround |
| 42 | // (until Apple fixes the bug) for a device with non-functioning AEC. May |
| 43 | // improve performance on that particular device, but will cause unpredictable |
| 44 | // behavior in all other cases. See http://bugs.webrtc.org/8682. |
| 45 | absl::optional<bool> ios_force_software_aec_HACK; |
| 46 | #endif |
| 47 | // Audio processing to adjust the sensitivity of the local mic dynamically. |
| 48 | absl::optional<bool> auto_gain_control; |
| 49 | // Audio processing to filter out background noise. |
| 50 | absl::optional<bool> noise_suppression; |
| 51 | // Audio processing to remove background noise of lower frequencies. |
| 52 | absl::optional<bool> highpass_filter; |
| 53 | // Audio processing to swap the left and right channels. |
| 54 | absl::optional<bool> stereo_swapping; |
| 55 | // Audio receiver jitter buffer (NetEq) max capacity in number of packets. |
| 56 | absl::optional<int> audio_jitter_buffer_max_packets; |
| 57 | // Audio receiver jitter buffer (NetEq) fast accelerate mode. |
| 58 | absl::optional<bool> audio_jitter_buffer_fast_accelerate; |
| 59 | // Audio receiver jitter buffer (NetEq) minimum target delay in milliseconds. |
| 60 | absl::optional<int> audio_jitter_buffer_min_delay_ms; |
| 61 | // Enable audio network adaptor. |
| 62 | // TODO(webrtc:11717): Remove this API in favor of adaptivePtime in |
| 63 | // RtpEncodingParameters. |
| 64 | absl::optional<bool> audio_network_adaptor; |
| 65 | // Config string for audio network adaptor. |
| 66 | absl::optional<std::string> audio_network_adaptor_config; |
| 67 | // Pre-initialize the ADM for recording when starting to send. Default to |
| 68 | // true. |
| 69 | // TODO(webrtc:13566): Remove this option. See issue for details. |
| 70 | absl::optional<bool> init_recording_on_send; |
| 71 | }; |
| 72 |
| 73 | } // namespace cricket |
| 74 |
| 75 | #endif // API_AUDIO_OPTIONS_H_ |
| 76 |