Home | History | Annotate | Download | only in audio_processing
      1 syntax = "proto2";
      2 option optimize_for = LITE_RUNTIME;
      3 package webrtc.audioproc;
      4 
      5 // Contains the format of input/output/reverse audio. An Init message is added
      6 // when any of the fields are changed.
      7 message Init {
      8   optional int32 sample_rate = 1;
      9   optional int32 device_sample_rate = 2 [deprecated=true];
     10   optional int32 num_input_channels = 3;
     11   optional int32 num_output_channels = 4;
     12   optional int32 num_reverse_channels = 5;
     13   optional int32 reverse_sample_rate = 6;
     14   optional int32 output_sample_rate = 7;
     15 }
     16 
     17 // May contain interleaved or deinterleaved data, but don't store both formats.
     18 message ReverseStream {
     19   // int16 interleaved data.
     20   optional bytes data = 1;
     21 
     22   // float deinterleaved data, where each repeated element points to a single
     23   // channel buffer of data.
     24   repeated bytes channel = 2;
     25 }
     26 
     27 // May contain interleaved or deinterleaved data, but don't store both formats.
     28 message Stream {
     29   // int16 interleaved data.
     30   optional bytes input_data = 1;
     31   optional bytes output_data = 2;
     32 
     33   optional int32 delay = 3;
     34   optional sint32 drift = 4;
     35   optional int32 level = 5;
     36   optional bool keypress = 6;
     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;
     42 }
     43 
     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 
     72 message Event {
     73   enum Type {
     74     INIT = 0;
     75     REVERSE_STREAM = 1;
     76     STREAM = 2;
     77     CONFIG = 3;
     78     UNKNOWN_EVENT = 4;
     79   }
     80 
     81   required Type type = 1;
     82 
     83   optional Init init = 2;
     84   optional ReverseStream reverse_stream = 3;
     85   optional Stream stream = 4;
     86   optional Config config = 5;
     87 }
     88