| 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 #include <stdint.h> | |
| 9 | |
| 10 // Shared structs with whispernet. TODO(rkc): These will be removed once we can | |
| 11 // get protobufs working with Nacl. At that point, we'll just pass in | |
| 12 // config_data.proto to the whispernet nacl wrapper directly. | |
| 13 | |
| 14 // We will be using fixed types in all these structures since they will be | |
| 15 // stuffed into a string and then read on the other side via a completely | |
| 16 // different toolchain. | |
| 17 | |
| 18 struct AudioDsssParams { | |
| 19 int64_t include_parity_symbol; | |
| 20 int64_t use_single_sideband; | |
| 21 double desired_carrier_frequency; | |
| 22 int64_t use_crc_16; | |
| 23 double coder_sample_rate; | |
| 24 double recording_sample_rate; | |
| 25 int64_t bits_per_symbol; | |
| 26 int64_t min_cycles_per_frame; | |
| 27 int64_t baseband_decimation_factor; | |
| 28 int64_t upsampling_factor; | |
| 29 int64_t num_repetitions_to_play; | |
| 30 }; | |
| 31 | |
| 32 struct AdsrParams { | |
| 33 int64_t attack_time_millis; | |
| 34 int64_t decay_time_millis; | |
| 35 int64_t sustain_time_millis; | |
| 36 int64_t release_time_millis; | |
| 37 double sustain_amplitude; | |
| 38 }; | |
| 39 | |
| 40 struct AudioDtmfParams { | |
| 41 int64_t include_parity_symbol; | |
| 42 int64_t use_crc_16; | |
| 43 double coder_sample_rate; | |
| 44 double recording_sample_rate; | |
| 45 int64_t baseband_decimation_factor; | |
| 46 int64_t frequencies_per_symbol; | |
| 47 int64_t window_duration_millis; | |
| 48 AdsrParams adsr_params; | |
| 49 int64_t num_repetitions_to_play; | |
| 50 }; | |
| 51 | |
| 52 struct LoggerParam { | |
| 53 int64_t clear_cached_request_duration_millis; | |
| 54 int64_t request_buffer_limit; | |
| 55 }; | |
| 56 | |
| 57 struct AudioParamData { | |
| 58 LoggerParam logger; | |
| 59 AudioDsssParams audio_dsss; | |
| 60 AudioDtmfParams audio_dtmf; | |
| 61 int64_t recording_channels; | |
| 62 }; | |
| 63 | |
| 64 #endif // CHROME_BROWSER_COPRESENCE_CHROME_WHISPERNET_CONFIG_H_ | |
| OLD | NEW |