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

Unified Diff: media/audio/sounds/sounds_manager.cc

Issue 115693004: Added volume adjust sound behind the flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix. Created 6 years, 11 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
Index: media/audio/sounds/sounds_manager.cc
diff --git a/media/audio/sounds/sounds_manager.cc b/media/audio/sounds/sounds_manager.cc
index de6ff094d6e3fe750e5ac58ac968ae9b67f2e7c0..df18a95e1fe2fb794e566d21a26fb429f72c833e 100644
--- a/media/audio/sounds/sounds_manager.cc
+++ b/media/audio/sounds/sounds_manager.cc
@@ -75,9 +75,7 @@ base::TimeDelta SoundsManagerImpl::GetDuration(SoundKey key) {
return base::TimeDelta();
}
const WavAudioHandler& wav_audio = handlers_[key]->wav_audio_handler();
- const int64 size = wav_audio.size();
- const int64 rate = wav_audio.byte_rate();
- return base::TimeDelta::FromMicroseconds(size * 1000000 / rate);
+ return wav_audio.params().GetBufferDuration();
}
// SoundsManagerStub ---------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698