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

Unified Diff: media/audio/audio_parameters.h

Issue 1538463002: Revert of Forward the number of skipped frames by the OS in audio playout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_output_stream_sink.cc ('k') | media/audio/clockless_audio_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_parameters.h
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h
index f93688104d7a05b848942142f953bd7603b3b1a2..c59dd30885e36672cde8eb6e1a2086ac3e94a2ee 100644
--- a/media/audio/audio_parameters.h
+++ b/media/audio/audio_parameters.h
@@ -19,27 +19,24 @@
namespace media {
// Use a struct-in-struct approach to ensure that we can calculate the required
-// size as sizeof(Audio{Input,Output}BufferParameters) + #(bytes in audio
-// buffer) without using packing. Also align Audio{Input,Output}BufferParameters
-// instead of in Audio{Input,Output}Buffer to be able to calculate size like so.
-// Use a macro for the alignment value that's the same as
-// AudioBus::kChannelAlignment, since MSVC doesn't accept the latter to be used.
+// size as sizeof(AudioInputBufferParameters) + #(bytes in audio buffer) without
+// using packing. Also align AudioInputBufferParameters instead of in
+// AudioInputBuffer to be able to calculate size like so. Use a macro for the
+// alignment value that's the same as AudioBus::kChannelAlignment, since MSVC
+// doesn't accept the latter to be used.
#if defined(OS_WIN)
#pragma warning(push)
#pragma warning(disable: 4324) // Disable warning for added padding.
#endif
#define PARAMETERS_ALIGNMENT 16
static_assert(AudioBus::kChannelAlignment == PARAMETERS_ALIGNMENT,
- "Audio buffer parameters struct alignment not same as AudioBus");
+ "AudioInputBufferParameters alignment not same as AudioBus");
struct MEDIA_EXPORT ALIGNAS(PARAMETERS_ALIGNMENT) AudioInputBufferParameters {
double volume;
- uint32_t size;
+ uint32 size;
uint32_t hardware_delay_bytes;
uint32_t id;
bool key_pressed;
-};
-struct MEDIA_EXPORT ALIGNAS(PARAMETERS_ALIGNMENT) AudioOutputBufferParameters {
- uint32_t frames_skipped;
};
#undef PARAMETERS_ALIGNMENT
#if defined(OS_WIN)
@@ -50,17 +47,9 @@
AudioBus::kChannelAlignment ==
0,
"AudioInputBufferParameters not aligned");
-static_assert(sizeof(AudioOutputBufferParameters) %
- AudioBus::kChannelAlignment ==
- 0,
- "AudioOutputBufferParameters not aligned");
struct MEDIA_EXPORT AudioInputBuffer {
AudioInputBufferParameters params;
- int8 audio[1];
-};
-struct MEDIA_EXPORT AudioOutputBuffer {
- AudioOutputBufferParameters params;
int8 audio[1];
};
« no previous file with comments | « media/audio/audio_output_stream_sink.cc ('k') | media/audio/clockless_audio_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698