• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto2";
2option optimize_for = LITE_RUNTIME;
3package webrtc.audioproc;
4
5// Contains the format of input/output/reverse audio. An Init message is added
6// when any of the fields are changed.
7message Init {
8  optional int32 sample_rate = 1;
9  optional int32 device_sample_rate = 2 [deprecated=true];
10  optional int32 num_input_channels = 3;
11  optional int32 num_output_channels = 4;
12  optional int32 num_reverse_channels = 5;
13  optional int32 reverse_sample_rate = 6;
14  optional int32 output_sample_rate = 7;
15  optional int32 reverse_output_sample_rate = 8;
16  optional int32 num_reverse_output_channels = 9;
17  optional int64 timestamp_ms = 10;
18}
19
20// May contain interleaved or deinterleaved data, but don't store both formats.
21message ReverseStream {
22  // int16 interleaved data.
23  optional bytes data = 1;
24
25  // float deinterleaved data, where each repeated element points to a single
26  // channel buffer of data.
27  repeated bytes channel = 2;
28}
29
30// May contain interleaved or deinterleaved data, but don't store both formats.
31message Stream {
32  // int16 interleaved data.
33  optional bytes input_data = 1;
34  optional bytes output_data = 2;
35
36  optional int32 delay = 3;
37  optional sint32 drift = 4;
38  optional int32 level = 5;
39  optional bool keypress = 6;
40
41  // float deinterleaved data, where each repeated element points to a single
42  // channel buffer of data.
43  repeated bytes input_channel = 7;
44  repeated bytes output_channel = 8;
45}
46
47// Contains the configurations of various APM component. A Config message is
48// added when any of the fields are changed.
49message Config {
50  // Acoustic echo canceler.
51  optional bool aec_enabled = 1;
52  optional bool aec_delay_agnostic_enabled = 2;
53  optional bool aec_drift_compensation_enabled = 3;
54  optional bool aec_extended_filter_enabled = 4;
55  optional int32 aec_suppression_level = 5;
56  // Mobile AEC.
57  optional bool aecm_enabled = 6;
58  optional bool aecm_comfort_noise_enabled = 7 [deprecated = true];
59  optional int32 aecm_routing_mode = 8 [deprecated = true];
60  // Automatic gain controller.
61  optional bool agc_enabled = 9;
62  optional int32 agc_mode = 10;
63  optional bool agc_limiter_enabled = 11;
64  optional bool noise_robust_agc_enabled = 12;
65  // High pass filter.
66  optional bool hpf_enabled = 13;
67  // Noise suppression.
68  optional bool ns_enabled = 14;
69  optional int32 ns_level = 15;
70  // Transient suppression.
71  optional bool transient_suppression_enabled = 16;
72  // Semicolon-separated string containing experimental feature
73  // descriptions.
74  optional string experiments_description = 17;
75  reserved 18;  // Intelligibility enhancer enabled (deprecated).
76  // Pre amplifier.
77  optional bool pre_amplifier_enabled = 19;
78  optional float pre_amplifier_fixed_gain_factor = 20;
79
80  // Next field number 21.
81}
82
83message PlayoutAudioDeviceInfo {
84  optional int32 id = 1;
85  optional int32 max_volume = 2;
86}
87
88message RuntimeSetting {
89  optional float capture_pre_gain = 1;
90  optional float custom_render_processing_setting = 2;
91  optional float capture_fixed_post_gain = 3;
92  optional int32 playout_volume_change = 4;
93  optional PlayoutAudioDeviceInfo playout_audio_device_change = 5;
94}
95
96message Event {
97  enum Type {
98    INIT = 0;
99    REVERSE_STREAM = 1;
100    STREAM = 2;
101    CONFIG = 3;
102    UNKNOWN_EVENT = 4;
103    RUNTIME_SETTING = 5;
104  }
105
106  required Type type = 1;
107
108  optional Init init = 2;
109  optional ReverseStream reverse_stream = 3;
110  optional Stream stream = 4;
111  optional Config config = 5;
112  optional RuntimeSetting runtime_setting = 6;
113}
114