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]; |
}; |