Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: chrome/browser/copresence/chrome_whispernet_config.h

Issue 940123004: Convert audio samples in Whispernet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fix. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_COPRESENCE_CHROME_WHISPERNET_CONFIG_H_ 5 #ifndef CHROME_BROWSER_COPRESENCE_CHROME_WHISPERNET_CONFIG_H_
6 #define CHROME_BROWSER_COPRESENCE_CHROME_WHISPERNET_CONFIG_H_ 6 #define CHROME_BROWSER_COPRESENCE_CHROME_WHISPERNET_CONFIG_H_
7 7
8 // Shared structs with whispernet. TODO(rkc): These will be removed once we can 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 9 // get protobufs working with Nacl. At that point, we'll just pass in
10 // config_data.proto to the whispernet nacl wrapper directly. 10 // config_data.proto to the whispernet nacl wrapper directly.
11 11
12 // We will be using fixed types in all these structures since they will be 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 13 // stuffed into a string and then read on the other side via a completely
14 // different toolchain. 14 // different toolchain.
15 15
16 struct AudioDsssParams { 16 struct AudioDsssParams {
17 int64_t include_parity_symbol; 17 int64_t include_parity_symbol;
18 int64_t use_single_sideband; 18 int64_t use_single_sideband;
19 double desired_carrier_frequency; 19 double desired_carrier_frequency;
20 int64_t use_crc_16; 20 int64_t use_crc_16;
21 double coder_sample_rate; 21 double coder_sample_rate;
22 double recording_sample_rate;
22 int64_t bits_per_symbol; 23 int64_t bits_per_symbol;
23 int64_t min_cycles_per_frame; 24 int64_t min_cycles_per_frame;
24 int64_t baseband_decimation_factor; 25 int64_t baseband_decimation_factor;
25 int64_t upsampling_factor; 26 int64_t upsampling_factor;
26 int64_t num_repetitions_to_play; 27 int64_t num_repetitions_to_play;
27 }; 28 };
28 29
29 struct AdsrParams { 30 struct AdsrParams {
30 int64_t attack_time_millis; 31 int64_t attack_time_millis;
31 int64_t decay_time_millis; 32 int64_t decay_time_millis;
32 int64_t sustain_time_millis; 33 int64_t sustain_time_millis;
33 int64_t release_time_millis; 34 int64_t release_time_millis;
34 double sustain_amplitude; 35 double sustain_amplitude;
35 }; 36 };
36 37
37 struct AudioDtmfParams { 38 struct AudioDtmfParams {
38 int64_t include_parity_symbol; 39 int64_t include_parity_symbol;
39 int64_t use_crc_16; 40 int64_t use_crc_16;
40 double coder_sample_rate; 41 double coder_sample_rate;
42 double recording_sample_rate;
41 int64_t baseband_decimation_factor; 43 int64_t baseband_decimation_factor;
42 int64_t frequencies_per_symbol; 44 int64_t frequencies_per_symbol;
43 int64_t window_duration_millis; 45 int64_t window_duration_millis;
44 AdsrParams adsr_params; 46 AdsrParams adsr_params;
45 int64_t num_repetitions_to_play; 47 int64_t num_repetitions_to_play;
46 }; 48 };
47 49
48 struct LoggerParam { 50 struct LoggerParam {
49 int64_t clear_cached_request_duration_millis; 51 int64_t clear_cached_request_duration_millis;
50 int64_t request_buffer_limit; 52 int64_t request_buffer_limit;
51 }; 53 };
52 54
53 struct AudioParamData { 55 struct AudioParamData {
54 LoggerParam logger; 56 LoggerParam logger;
55 AudioDsssParams audio_dsss; 57 AudioDsssParams audio_dsss;
56 AudioDtmfParams audio_dtmf; 58 AudioDtmfParams audio_dtmf;
57 int64_t recording_channels; 59 int64_t recording_channels;
58 }; 60 };
59 61
60 #endif // CHROME_BROWSER_COPRESENCE_CHROME_WHISPERNET_CONFIG_H_ 62 #endif // CHROME_BROWSER_COPRESENCE_CHROME_WHISPERNET_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698