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; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 17 | } |
| 18 | |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 19 | // 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] | 20 | message ReverseStream { |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 21 | // int16 interleaved data. |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 22 | optional bytes data = 1; |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 23 | |
| 24 | // float deinterleaved data, where each repeated element points to a single |
| 25 | // channel buffer of data. |
| 26 | repeated bytes channel = 2; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 27 | } |
| 28 | |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 29 | // 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] | 30 | message Stream { |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 31 | // int16 interleaved data. |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 32 | optional bytes input_data = 1; |
| 33 | optional bytes output_data = 2; |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 34 | |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 35 | optional int32 delay = 3; |
| 36 | optional sint32 drift = 4; |
| 37 | optional int32 level = 5; |
andrew@webrtc.org | ce8e077 | 2014-02-12 15:28:30 +0000 | [diff] [blame] | 38 | optional bool keypress = 6; |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 39 | |
| 40 | // float deinterleaved data, where each repeated element points to a single |
| 41 | // channel buffer of data. |
| 42 | repeated bytes input_channel = 7; |
| 43 | repeated bytes output_channel = 8; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 44 | } |
| 45 | |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame] | 46 | // Contains the configurations of various APM component. A Config message is |
| 47 | // added when any of the fields are changed. |
| 48 | message Config { |
| 49 | // Next field number 17. |
| 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; |
| 59 | optional int32 aecm_routing_mode = 8; |
| 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 | } |
| 73 | |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 74 | message Event { |
| 75 | enum Type { |
| 76 | INIT = 0; |
| 77 | REVERSE_STREAM = 1; |
| 78 | STREAM = 2; |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame] | 79 | CONFIG = 3; |
| 80 | UNKNOWN_EVENT = 4; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 81 | } |
| 82 | |
| 83 | required Type type = 1; |
| 84 | |
| 85 | optional Init init = 2; |
| 86 | optional ReverseStream reverse_stream = 3; |
| 87 | optional Stream stream = 4; |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame] | 88 | optional Config config = 5; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 89 | } |