summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-14 22:14:18 +0000
committerfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-14 22:14:18 +0000
commit15be52d093e8c419cc58bdc20bce133c9195e922 (patch)
treed231feba59f76ad8c51b54b40d1e46b37a363ea1 /media
parentb6ce15971b4139103635132bb9c9d3cd2224973e (diff)
downloadchromium_src-15be52d093e8c419cc58bdc20bce133c9195e922.zip
chromium_src-15be52d093e8c419cc58bdc20bce133c9195e922.tar.gz
chromium_src-15be52d093e8c419cc58bdc20bce133c9195e922.tar.bz2
Set Volume to full at start.
Review URL: http://codereview.chromium.org/149624 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20678 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/base/pipeline_impl.cc4
-rw-r--r--media/base/pipeline_impl_unittest.cc6
2 files changed, 5 insertions, 5 deletions
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc
index 9ba4181..eeeeda6 100644
--- a/media/base/pipeline_impl.cc
+++ b/media/base/pipeline_impl.cc
@@ -83,7 +83,7 @@ PipelineImpl::~PipelineImpl() {
}
// Creates the PipelineInternal and calls it's start method.
-bool PipelineImpl::Start(FilterFactory* factory,
+ bool PipelineImpl::Start(FilterFactory* factory,
const std::string& url,
PipelineCallback* start_callback) {
DCHECK(!pipeline_internal_) << "PipelineInternal already exists";
@@ -217,7 +217,7 @@ void PipelineImpl::ResetState() {
total_bytes_ = 0;
video_width_ = 0;
video_height_ = 0;
- volume_ = 0.0f;
+ volume_ = 1.0f;
playback_rate_ = 0.0f;
error_ = PIPELINE_OK;
time_ = base::TimeDelta();
diff --git a/media/base/pipeline_impl_unittest.cc b/media/base/pipeline_impl_unittest.cc
index 8d8053d..12cb40c 100644
--- a/media/base/pipeline_impl_unittest.cc
+++ b/media/base/pipeline_impl_unittest.cc
@@ -122,7 +122,7 @@ class PipelineImplTest : public ::testing::Test {
.WillOnce(DoAll(InitializationComplete(mocks_->audio_renderer()),
Return(true)));
EXPECT_CALL(*mocks_->audio_renderer(), SetPlaybackRate(0.0f));
- EXPECT_CALL(*mocks_->audio_renderer(), SetVolume(0.0f));
+ EXPECT_CALL(*mocks_->audio_renderer(), SetVolume(1.0f));
EXPECT_CALL(*mocks_->audio_renderer(), Stop());
}
@@ -177,9 +177,9 @@ TEST_F(PipelineImplTest, NotStarted) {
EXPECT_EQ(1.0f, pipeline_.GetPlaybackRate());
// Setting should still work.
- EXPECT_EQ(0.0f, pipeline_.GetVolume());
+ EXPECT_EQ(1.0f, pipeline_.GetVolume());
pipeline_.SetVolume(-1.0f);
- EXPECT_EQ(0.0f, pipeline_.GetVolume());
+ EXPECT_EQ(1.0f, pipeline_.GetVolume());
pipeline_.SetVolume(1.0f);
EXPECT_EQ(1.0f, pipeline_.GetVolume());