| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/callback_helpers.h" | 6 #include "base/callback_helpers.h" |
| 7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "media/base/audio_buffer_converter.h" | 10 #include "media/base/audio_buffer_converter.h" |
| 11 #include "media/base/audio_hardware_config.h" | 11 #include "media/base/audio_hardware_config.h" |
| 12 #include "media/base/audio_splicer.h" | 12 #include "media/base/audio_splicer.h" |
| 13 #include "media/base/fake_audio_renderer_sink.h" | 13 #include "media/base/fake_audio_renderer_sink.h" |
| 14 #include "media/base/gmock_callback_support.h" | 14 #include "media/base/gmock_callback_support.h" |
| 15 #include "media/base/mock_filters.h" | 15 #include "media/base/mock_filters.h" |
| 16 #include "media/base/test_helpers.h" | 16 #include "media/base/test_helpers.h" |
| 17 #include "media/filters/audio_renderer_impl.h" | 17 #include "media/renderers/audio_renderer_impl.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 | 19 |
| 20 using ::base::TimeDelta; | 20 using ::base::TimeDelta; |
| 21 using ::testing::_; | 21 using ::testing::_; |
| 22 using ::testing::Return; | 22 using ::testing::Return; |
| 23 using ::testing::SaveArg; | 23 using ::testing::SaveArg; |
| 24 | 24 |
| 25 namespace media { | 25 namespace media { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 738 // Start rendering with zero playback rate. Sink should be paused until | 738 // Start rendering with zero playback rate. Sink should be paused until |
| 739 // non-zero rate is set. | 739 // non-zero rate is set. |
| 740 renderer_->SetPlaybackRate(0.0f); | 740 renderer_->SetPlaybackRate(0.0f); |
| 741 renderer_->StartTicking(); | 741 renderer_->StartTicking(); |
| 742 EXPECT_EQ(FakeAudioRendererSink::kPaused, sink_->state()); | 742 EXPECT_EQ(FakeAudioRendererSink::kPaused, sink_->state()); |
| 743 renderer_->SetPlaybackRate(1.0f); | 743 renderer_->SetPlaybackRate(1.0f); |
| 744 EXPECT_EQ(FakeAudioRendererSink::kPlaying, sink_->state()); | 744 EXPECT_EQ(FakeAudioRendererSink::kPlaying, sink_->state()); |
| 745 } | 745 } |
| 746 | 746 |
| 747 } // namespace media | 747 } // namespace media |
| OLD | NEW |