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

Side by Side Diff: media/audio/audio_parameters.h

Issue 21183002: Adding key press detection in the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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
« no previous file with comments | « media/audio/audio_input_device.cc ('k') | media/audio/test_audio_input_controller_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_PARAMETERS_H_
6 #define MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 6 #define MEDIA_AUDIO_AUDIO_PARAMETERS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "media/base/channel_layout.h" 9 #include "media/base/channel_layout.h"
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 struct MEDIA_EXPORT AudioInputBufferParameters { 14 struct MEDIA_EXPORT AudioInputBufferParameters {
15 double volume; 15 double volume;
16 uint32 size; 16 uint32 size;
17 bool key_pressed;
17 }; 18 };
18 19
19 // Use a struct-in-struct approach to ensure that we can calculate the required 20 // Use a struct-in-struct approach to ensure that we can calculate the required
20 // size as sizeof(AudioInputBufferParameters) + #(bytes in audio buffer) without 21 // size as sizeof(AudioInputBufferParameters) + #(bytes in audio buffer) without
21 // using packing. 22 // using packing.
22 struct MEDIA_EXPORT AudioInputBuffer { 23 struct MEDIA_EXPORT AudioInputBuffer {
23 AudioInputBufferParameters params; 24 AudioInputBufferParameters params;
24 int8 audio[1]; 25 int8 audio[1];
25 }; 26 };
26 27
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 if (a.sample_rate() != b.sample_rate()) 115 if (a.sample_rate() != b.sample_rate())
115 return a.sample_rate() < b.sample_rate(); 116 return a.sample_rate() < b.sample_rate();
116 if (a.bits_per_sample() != b.bits_per_sample()) 117 if (a.bits_per_sample() != b.bits_per_sample())
117 return a.bits_per_sample() < b.bits_per_sample(); 118 return a.bits_per_sample() < b.bits_per_sample();
118 return a.frames_per_buffer() < b.frames_per_buffer(); 119 return a.frames_per_buffer() < b.frames_per_buffer();
119 } 120 }
120 121
121 } // namespace media 122 } // namespace media
122 123
123 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_ 124 #endif // MEDIA_AUDIO_AUDIO_PARAMETERS_H_
OLDNEW
« no previous file with comments | « media/audio/audio_input_device.cc ('k') | media/audio/test_audio_input_controller_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698