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; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 15 | } |
| 16 | |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 17 | // 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] | 18 | message ReverseStream { |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 19 | // int16 interleaved data. |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 20 | optional bytes data = 1; |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 21 | |
| 22 | // float deinterleaved data, where each repeated element points to a single |
| 23 | // channel buffer of data. |
| 24 | repeated bytes channel = 2; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 25 | } |
| 26 | |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 27 | // 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] | 28 | message Stream { |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 29 | // int16 interleaved data. |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 30 | optional bytes input_data = 1; |
| 31 | optional bytes output_data = 2; |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 32 | |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 33 | optional int32 delay = 3; |
| 34 | optional sint32 drift = 4; |
| 35 | optional int32 level = 5; |
andrew@webrtc.org | ce8e077 | 2014-02-12 15:28:30 +0000 | [diff] [blame] | 36 | optional bool keypress = 6; |
andrew@webrtc.org | 17e4064 | 2014-03-04 20:58:13 +0000 | [diff] [blame] | 37 | |
| 38 | // float deinterleaved data, where each repeated element points to a single |
| 39 | // channel buffer of data. |
| 40 | repeated bytes input_channel = 7; |
| 41 | repeated bytes output_channel = 8; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 42 | } |
| 43 | |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame^] | 44 | // Contains the configurations of various APM component. A Config message is |
| 45 | // added when any of the fields are changed. |
| 46 | message Config { |
| 47 | // Next field number 17. |
| 48 | // Acoustic echo canceler. |
| 49 | optional bool aec_enabled = 1; |
| 50 | optional bool aec_delay_agnostic_enabled = 2; |
| 51 | optional bool aec_drift_compensation_enabled = 3; |
| 52 | optional bool aec_extended_filter_enabled = 4; |
| 53 | optional int32 aec_suppression_level = 5; |
| 54 | // Mobile AEC. |
| 55 | optional bool aecm_enabled = 6; |
| 56 | optional bool aecm_comfort_noise_enabled = 7; |
| 57 | optional int32 aecm_routing_mode = 8; |
| 58 | // Automatic gain controller. |
| 59 | optional bool agc_enabled = 9; |
| 60 | optional int32 agc_mode = 10; |
| 61 | optional bool agc_limiter_enabled = 11; |
| 62 | optional bool noise_robust_agc_enabled = 12; |
| 63 | // High pass filter. |
| 64 | optional bool hpf_enabled = 13; |
| 65 | // Noise suppression. |
| 66 | optional bool ns_enabled = 14; |
| 67 | optional int32 ns_level = 15; |
| 68 | // Transient suppression. |
| 69 | optional bool transient_suppression_enabled = 16; |
| 70 | } |
| 71 | |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 72 | message Event { |
| 73 | enum Type { |
| 74 | INIT = 0; |
| 75 | REVERSE_STREAM = 1; |
| 76 | STREAM = 2; |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame^] | 77 | CONFIG = 3; |
| 78 | UNKNOWN_EVENT = 4; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 79 | } |
| 80 | |
| 81 | required Type type = 1; |
| 82 | |
| 83 | optional Init init = 2; |
| 84 | optional ReverseStream reverse_stream = 3; |
| 85 | optional Stream stream = 4; |
Minyue | 13b96ba | 2015-10-03 00:39:14 +0200 | [diff] [blame^] | 86 | optional Config config = 5; |
ajm@google.com | 808e0e0 | 2011-08-03 21:08:51 +0000 | [diff] [blame] | 87 | } |