OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_COPRESENCE_CHROME_WHISPERNET_CONFIG_H_ |
| 6 #define CHROME_BROWSER_COPRESENCE_CHROME_WHISPERNET_CONFIG_H_ |
| 7 |
| 8 // Shared structs with whispernet. TODO(rkc): These will be removed once we can |
| 9 // get protobufs working with Nacl. At that point, we'll just pass in |
| 10 // config_data.proto to the whispernet nacl wrapper directly. |
| 11 |
| 12 // We will be using fixed types in all these structures since they will be |
| 13 // stuffed into a string and then read on the other side via a completely |
| 14 // different toolchain. |
| 15 |
| 16 struct AudioDsssParams { |
| 17 int64_t include_parity_symbol; |
| 18 int64_t use_single_sideband; |
| 19 double desired_carrier_frequency; |
| 20 int64_t use_crc_16; |
| 21 double coder_sample_rate; |
| 22 int64_t bits_per_symbol; |
| 23 int64_t min_cycles_per_frame; |
| 24 int64_t baseband_decimation_factor; |
| 25 int64_t upsampling_factor; |
| 26 int64_t num_repetitions_to_play; |
| 27 }; |
| 28 |
| 29 struct AdsrParams { |
| 30 int64_t attack_time_millis; |
| 31 int64_t decay_time_millis; |
| 32 int64_t sustain_time_millis; |
| 33 int64_t release_time_millis; |
| 34 double sustain_amplitude; |
| 35 }; |
| 36 |
| 37 struct AudioDtmfParams { |
| 38 int64_t include_parity_symbol; |
| 39 int64_t use_crc_16; |
| 40 double coder_sample_rate; |
| 41 int64_t baseband_decimation_factor; |
| 42 int64_t frequencies_per_symbol; |
| 43 int64_t window_duration_millis; |
| 44 AdsrParams adsr_params; |
| 45 int64_t num_repetitions_to_play; |
| 46 }; |
| 47 |
| 48 struct LoggerParam { |
| 49 int64_t clear_cached_request_duration_millis; |
| 50 int64_t request_buffer_limit; |
| 51 }; |
| 52 |
| 53 struct AudioParamData { |
| 54 LoggerParam logger; |
| 55 AudioDsssParams audio_dsss; |
| 56 AudioDtmfParams audio_dtmf; |
| 57 int64_t recording_channels; |
| 58 }; |
| 59 |
| 60 #endif // CHROME_BROWSER_COPRESENCE_CHROME_WHISPERNET_CONFIG_H_ |
OLD | NEW |