ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 1 | syntax = "proto2"; |
| 2 | option optimize_for = LITE_RUNTIME; |
| 3 | package webrtc.audioproc; |
| 4 | |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame] | 5 | // Contains the format of input/output/reverse audio. An Init message is added |
| 6 | // when any of the fields are changed. |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 7 | message Init { |
| 8 | optional int32 sample_rate = 1; |
andrew@webrtc.org | ddbb8a2 | 2014-04-22 21:00:04 +0000 | [diff] [blame] | 9 | optional int32 device_sample_rate = 2 [deprecated=true]; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 10 | optional int32 num_input_channels = 3; |
| 11 | optional int32 num_output_channels = 4; |
| 12 | optional int32 num_reverse_channels = 5; |
andrew@webrtc.org | a8b9737 | 2014-03-10 22:26:12 +0000 | [diff] [blame] | 13 | optional int32 reverse_sample_rate = 6; |
andrew@webrtc.org | ddbb8a2 | 2014-04-22 21:00:04 +0000 | [diff] [blame] | 14 | optional int32 output_sample_rate = 7; |
peah | c7bdf8a | 2016-04-11 07:05:53 -0700 | [diff] [blame] | 15 | optional int32 reverse_output_sample_rate = 8; |
| 16 | optional int32 num_reverse_output_channels = 9; |
Minyue Li | 656d609 | 2018-08-10 15:38:52 +0200 | [diff] [blame] | 17 | optional int64 timestamp_ms = 10; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 18 | } |
| 19 | |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 20 | // May contain interleaved or deinterleaved data, but don't store both formats. |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 21 | message ReverseStream { |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 22 | // int16 interleaved data. |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 23 | optional bytes data = 1; |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 24 | |
| 25 | // float deinterleaved data, where each repeated element points to a single |
| 26 | // channel buffer of data. |
| 27 | repeated bytes channel = 2; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 28 | } |
| 29 | |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 30 | // May contain interleaved or deinterleaved data, but don't store both formats. |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 31 | message Stream { |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 32 | // int16 interleaved data. |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 33 | optional bytes input_data = 1; |
| 34 | optional bytes output_data = 2; |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 35 | |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 36 | optional int32 delay = 3; |
| 37 | optional sint32 drift = 4; |
| 38 | optional int32 level = 5; |
andrew@webrtc.org | ce8e077 | 2014-02-12 15:28:30 +0000 | [diff] [blame] | 39 | optional bool keypress = 6; |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 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; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 45 | } |
| 46 | |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame] | 47 | // Contains the configurations of various APM component. A Config message is |
| 48 | // added when any of the fields are changed. |
| 49 | message Config { |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame] | 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; |
Sam Zackrisson | 05a7004 | 2018-09-28 13:39:13 +0000 | [diff] [blame^] | 58 | optional bool aecm_comfort_noise_enabled = 7; |
| 59 | optional int32 aecm_routing_mode = 8; |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame] | 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; |
peah | 7789fe7 | 2016-04-15 01:19:44 -0700 | [diff] [blame] | 72 | // Semicolon-separated string containing experimental feature |
| 73 | // descriptions. |
| 74 | optional string experiments_description = 17; |
Alessio Bazzica | cc22f51 | 2018-08-30 13:01:34 +0200 | [diff] [blame] | 75 | reserved 18; // Intelligibility enhancer enabled (deprecated). |
Alex Loiko | 5feb30e | 2018-04-16 13:52:32 +0200 | [diff] [blame] | 76 | // Pre amplifier. |
| 77 | optional bool pre_amplifier_enabled = 19; |
| 78 | optional float pre_amplifier_fixed_gain_factor = 20; |
Alessio Bazzica | cc22f51 | 2018-08-30 13:01:34 +0200 | [diff] [blame] | 79 | |
| 80 | // Next field number 21. |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame] | 81 | } |
| 82 | |
Alex Loiko | 6234722 | 2018-09-10 10:18:07 +0200 | [diff] [blame] | 83 | message RuntimeSetting { |
| 84 | optional float capture_pre_gain = 1; |
| 85 | optional float custom_render_processing_setting = 2; |
| 86 | } |
| 87 | |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 88 | message Event { |
| 89 | enum Type { |
| 90 | INIT = 0; |
| 91 | REVERSE_STREAM = 1; |
| 92 | STREAM = 2; |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame] | 93 | CONFIG = 3; |
| 94 | UNKNOWN_EVENT = 4; |
Alex Loiko | 6234722 | 2018-09-10 10:18:07 +0200 | [diff] [blame] | 95 | RUNTIME_SETTING = 5; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 96 | } |
| 97 | |
| 98 | required Type type = 1; |
| 99 | |
| 100 | optional Init init = 2; |
| 101 | optional ReverseStream reverse_stream = 3; |
| 102 | optional Stream stream = 4; |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame] | 103 | optional Config config = 5; |
Alex Loiko | 6234722 | 2018-09-10 10:18:07 +0200 | [diff] [blame] | 104 | optional RuntimeSetting runtime_setting = 6; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 105 | } |