OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Use the <code>chrome.copresencePrivate</code> API to interface with Chrome | 5 // Use the <code>chrome.copresencePrivate</code> API to interface with Chrome |
6 // from the whispernet_proxy extension. | 6 // from the whispernet_proxy extension. |
7 namespace copresencePrivate { | 7 namespace copresencePrivate { |
8 dictionary DecodeRequestType { | |
9 boolean decodeAudible; | |
10 boolean decodeInaudible; | |
11 }; | |
not at google - send to devlin
2014/10/20 17:18:11
I'd probably call this DecodeSamplesParameters
rkc
2014/10/20 19:10:11
Done.
| |
8 | 12 |
9 dictionary PlayParameters { | 13 dictionary PlayParameters { |
10 double sampleRate; | 14 double sampleRate; |
11 long bitsPerSample; | 15 long bitsPerSample; |
12 double carrierFrequency; | 16 double carrierFrequency; |
13 long repetitions; | 17 long repetitions; |
14 }; | 18 }; |
15 | 19 |
16 dictionary RecordParameters { | 20 dictionary RecordParameters { |
17 double sampleRate; | 21 double sampleRate; |
(...skipping 22 matching lines...) Expand all Loading... | |
40 // Send a boolean indicating whether we detected a broadcast or not. | 44 // Send a boolean indicating whether we detected a broadcast or not. |
41 static void sendDetect(boolean detected); | 45 static void sendDetect(boolean detected); |
42 }; | 46 }; |
43 | 47 |
44 interface Events { | 48 interface Events { |
45 // Fired to request initialization of the whisper.net library. | 49 // Fired to request initialization of the whisper.net library. |
46 static void onInitialize(AudioParameters audioParams); | 50 static void onInitialize(AudioParameters audioParams); |
47 // Fired to request encoding of the given token. | 51 // Fired to request encoding of the given token. |
48 static void onEncodeTokenRequest(DOMString base64Token, boolean audible); | 52 static void onEncodeTokenRequest(DOMString base64Token, boolean audible); |
49 // Fired when we have new samples to decode. | 53 // Fired when we have new samples to decode. |
50 static void onDecodeSamplesRequest(ArrayBuffer audioSamples); | 54 static void onDecodeSamplesRequest(ArrayBuffer samples, |
55 DecodeRequestType request); | |
51 // Fired to request a DetectBroadcast. | 56 // Fired to request a DetectBroadcast. |
52 static void onDetectBroadcastRequest(); | 57 static void onDetectBroadcastRequest(); |
53 }; | 58 }; |
54 }; | 59 }; |
OLD | NEW |