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

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 7 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
Index: media/audio/sounds/sounds_manager.cc
diff --git a/media/audio/sounds/sounds_manager.cc b/media/audio/sounds/sounds_manager.cc
index e93dc6588dde598ef27263eaa4f351b543a5d808..f8f5377ecd0be903d0c4357d9a63fdd59d45770c 100644
--- a/media/audio/sounds/sounds_manager.cc
+++ b/media/audio/sounds/sounds_manager.cc
@@ -73,10 +73,8 @@ base::TimeDelta SoundsManagerImpl::GetDuration(SoundKey key) {
!handlers_[key]->IsInitialized()) {
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);
+ const WavParser& wav_parser = handlers_[key]->wav_parser();
+ return wav_parser.duration();
}
// SoundsManagerStub ---------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698