using ::testing::Return;
using ::testing::SetArrayArgument;
using media::AudioBus;
-using media::AudioBuffersState;
using media::AudioInputStream;
using media::AudioManager;
using media::AudioManagerBase;
class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback {
public:
- int OnMoreData(AudioBus* audio_bus, AudioBuffersState buffers_state) {
+ int OnMoreData(AudioBus* audio_bus, uint32 total_bytes_delay) {
audio_bus->Zero();
return audio_bus->frames();
}
class AudioOutputProxyTest : public testing::Test {
protected:
- virtual void SetUp() {
+ void SetUp() override {
EXPECT_CALL(manager_, GetTaskRunner())
.WillRepeatedly(Return(message_loop_.message_loop_proxy()));
EXPECT_CALL(manager_, GetWorkerTaskRunner())
InitDispatcher(base::TimeDelta::FromMilliseconds(kTestCloseDelayMs));
}
- virtual void TearDown() {
+ void TearDown() override {
// This is necessary to free all proxy objects that have been
// closed by the test.
message_loop_.RunUntilIdle();
class AudioOutputResamplerTest : public AudioOutputProxyTest {
public:
- virtual void TearDown() {
- AudioOutputProxyTest::TearDown();
- }
+ void TearDown() override { AudioOutputProxyTest::TearDown(); }
- virtual void InitDispatcher(base::TimeDelta close_delay) OVERRIDE {
+ void InitDispatcher(base::TimeDelta close_delay) override {
// Use a low sample rate and large buffer size when testing otherwise the
// FakeAudioOutputStream will keep the message loop busy indefinitely; i.e.,
// RunUntilIdle() will never terminate.
&manager(), params_, resampler_params_, std::string(), close_delay);
}
- virtual void OnStart() OVERRIDE {
+ void OnStart() override {
// Let Start() run for a bit.
base::RunLoop run_loop;
message_loop_.PostDelayedTask(