You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
3.3 KiB

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