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

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

Issue 2517503003: Reland: Make more media APIs aware of |delay| and |delay_timestamp| (Closed)
Patch Set: Fixed speech synthesis on Chrome OS Created 4 years, 1 month 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 (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_BASE_AUDIO_PARAMETERS_H_ 5 #ifndef MEDIA_BASE_AUDIO_PARAMETERS_H_
6 #define MEDIA_BASE_AUDIO_PARAMETERS_H_ 6 #define MEDIA_BASE_AUDIO_PARAMETERS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 10
(...skipping 23 matching lines...) Expand all
34 "Audio buffer parameters struct alignment not same as AudioBus"); 34 "Audio buffer parameters struct alignment not same as AudioBus");
35 struct MEDIA_EXPORT ALIGNAS(PARAMETERS_ALIGNMENT) AudioInputBufferParameters { 35 struct MEDIA_EXPORT ALIGNAS(PARAMETERS_ALIGNMENT) AudioInputBufferParameters {
36 double volume; 36 double volume;
37 uint32_t size; 37 uint32_t size;
38 uint32_t hardware_delay_bytes; 38 uint32_t hardware_delay_bytes;
39 uint32_t id; 39 uint32_t id;
40 bool key_pressed; 40 bool key_pressed;
41 }; 41 };
42 struct MEDIA_EXPORT ALIGNAS(PARAMETERS_ALIGNMENT) AudioOutputBufferParameters { 42 struct MEDIA_EXPORT ALIGNAS(PARAMETERS_ALIGNMENT) AudioOutputBufferParameters {
43 uint32_t frames_skipped; 43 uint32_t frames_skipped;
44 int64_t delay;
45 int64_t delay_timestamp;
44 }; 46 };
45 #undef PARAMETERS_ALIGNMENT 47 #undef PARAMETERS_ALIGNMENT
46 #if defined(OS_WIN) 48 #if defined(OS_WIN)
47 #pragma warning(pop) 49 #pragma warning(pop)
48 #endif 50 #endif
49 51
50 static_assert(sizeof(AudioInputBufferParameters) % 52 static_assert(sizeof(AudioInputBufferParameters) %
51 AudioBus::kChannelAlignment == 53 AudioBus::kChannelAlignment ==
52 0, 54 0,
53 "AudioInputBufferParameters not aligned"); 55 "AudioInputBufferParameters not aligned");
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 if (a.sample_rate() != b.sample_rate()) 225 if (a.sample_rate() != b.sample_rate())
224 return a.sample_rate() < b.sample_rate(); 226 return a.sample_rate() < b.sample_rate();
225 if (a.bits_per_sample() != b.bits_per_sample()) 227 if (a.bits_per_sample() != b.bits_per_sample())
226 return a.bits_per_sample() < b.bits_per_sample(); 228 return a.bits_per_sample() < b.bits_per_sample();
227 return a.frames_per_buffer() < b.frames_per_buffer(); 229 return a.frames_per_buffer() < b.frames_per_buffer();
228 } 230 }
229 231
230 } // namespace media 232 } // namespace media
231 233
232 #endif // MEDIA_BASE_AUDIO_PARAMETERS_H_ 234 #endif // MEDIA_BASE_AUDIO_PARAMETERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698