blob: 227271298c838824430908e3dc0dc588e8bab3ba [file] [log] [blame]
ajm@google.com808e0e02011-08-03 21:08:51 +00001syntax = "proto2";
2option optimize_for = LITE_RUNTIME;
3package webrtc.audioproc;
4
Minyue13b96ba2015-10-03 00:39:14 +02005// Contains the format of input/output/reverse audio. An Init message is added
6// when any of the fields are changed.
ajm@google.com808e0e02011-08-03 21:08:51 +00007message Init {
8 optional int32 sample_rate = 1;
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +00009 optional int32 device_sample_rate = 2 [deprecated=true];
ajm@google.com808e0e02011-08-03 21:08:51 +000010 optional int32 num_input_channels = 3;
11 optional int32 num_output_channels = 4;
12 optional int32 num_reverse_channels = 5;
andrew@webrtc.orga8b97372014-03-10 22:26:12 +000013 optional int32 reverse_sample_rate = 6;
andrew@webrtc.orgddbb8a22014-04-22 21:00:04 +000014 optional int32 output_sample_rate = 7;
ajm@google.com808e0e02011-08-03 21:08:51 +000015}
16
andrew@webrtc.org17e40642014-03-04 20:58:13 +000017// May contain interleaved or deinterleaved data, but don't store both formats.
ajm@google.com808e0e02011-08-03 21:08:51 +000018message ReverseStream {
andrew@webrtc.org17e40642014-03-04 20:58:13 +000019 // int16 interleaved data.
ajm@google.com808e0e02011-08-03 21:08:51 +000020 optional bytes data = 1;
andrew@webrtc.org17e40642014-03-04 20:58:13 +000021
22 // float deinterleaved data, where each repeated element points to a single
23 // channel buffer of data.
24 repeated bytes channel = 2;
ajm@google.com808e0e02011-08-03 21:08:51 +000025}
26
andrew@webrtc.org17e40642014-03-04 20:58:13 +000027// May contain interleaved or deinterleaved data, but don't store both formats.
ajm@google.com808e0e02011-08-03 21:08:51 +000028message Stream {
andrew@webrtc.org17e40642014-03-04 20:58:13 +000029 // int16 interleaved data.
ajm@google.com808e0e02011-08-03 21:08:51 +000030 optional bytes input_data = 1;
31 optional bytes output_data = 2;
andrew@webrtc.org17e40642014-03-04 20:58:13 +000032
ajm@google.com808e0e02011-08-03 21:08:51 +000033 optional int32 delay = 3;
34 optional sint32 drift = 4;
35 optional int32 level = 5;
andrew@webrtc.orgce8e0772014-02-12 15:28:30 +000036 optional bool keypress = 6;
andrew@webrtc.org17e40642014-03-04 20:58:13 +000037
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.com808e0e02011-08-03 21:08:51 +000042}
43
Minyue13b96ba2015-10-03 00:39:14 +020044// Contains the configurations of various APM component. A Config message is
45// added when any of the fields are changed.
46message 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.com808e0e02011-08-03 21:08:51 +000072message Event {
73 enum Type {
74 INIT = 0;
75 REVERSE_STREAM = 1;
76 STREAM = 2;
Minyue13b96ba2015-10-03 00:39:14 +020077 CONFIG = 3;
78 UNKNOWN_EVENT = 4;
ajm@google.com808e0e02011-08-03 21:08:51 +000079 }
80
81 required Type type = 1;
82
83 optional Init init = 2;
84 optional ReverseStream reverse_stream = 3;
85 optional Stream stream = 4;
Minyue13b96ba2015-10-03 00:39:14 +020086 optional Config config = 5;
ajm@google.com808e0e02011-08-03 21:08:51 +000087}