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

Unified Diff: media/base/audio_hash.cc

Issue 377803004: Fixes for re-enabling more MSVC level 4 warnings: media/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/audio_hash.h ('k') | media/base/audio_video_metadata_extractor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/audio_hash.cc
diff --git a/media/base/audio_hash.cc b/media/base/audio_hash.cc
index 28f16418b6656725a1a227124ed0a51c4c811fe2..7d705820c2da5300f4427cd118ebe4d0e4d7a880 100644
--- a/media/base/audio_hash.cc
+++ b/media/base/audio_hash.cc
@@ -16,7 +16,6 @@ namespace media {
AudioHash::AudioHash()
: audio_hash_(),
sample_count_(0) {
- COMPILE_ASSERT(arraysize(audio_hash_) == kHashBuckets, audio_hash_size_error);
}
AudioHash::~AudioHash() {}
@@ -27,7 +26,8 @@ void AudioHash::Update(const AudioBus* audio_bus, int frames) {
const float* channel = audio_bus->channel(ch);
for (uint32 i = 0; i < static_cast<uint32>(frames); ++i) {
const uint32 kSampleIndex = sample_count_ + i;
- const uint32 kHashIndex = (kSampleIndex * (ch + 1)) % kHashBuckets;
+ const uint32 kHashIndex =
+ (kSampleIndex * (ch + 1)) % arraysize(audio_hash_);
// Mix in a sine wave with the result so we ensure that sequences of empty
// buffers don't result in an empty hash.
« no previous file with comments | « media/base/audio_hash.h ('k') | media/base/audio_video_metadata_extractor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698