fake_audio_log_factory.cc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2013 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "media/audio/fake_audio_log_factory.h"
  5. #include <string>
  6. namespace media {
  7. class FakeAudioLogImpl : public AudioLog {
  8. public:
  9. FakeAudioLogImpl() = default;
  10. ~FakeAudioLogImpl() override = default;
  11. void OnCreated(const media::AudioParameters& params,
  12. const std::string& device_id) override {}
  13. void OnStarted() override {}
  14. void OnStopped() override {}
  15. void OnClosed() override {}
  16. void OnError() override {}
  17. void OnSetVolume(double volume) override {}
  18. void OnProcessingStateChanged(const std::string& message) override {}
  19. void OnLogMessage(const std::string& message) override {}
  20. };
  21. FakeAudioLogFactory::FakeAudioLogFactory() = default;
  22. FakeAudioLogFactory::~FakeAudioLogFactory() = default;
  23. std::unique_ptr<AudioLog> FakeAudioLogFactory::CreateAudioLog(
  24. AudioComponent component,
  25. int component_id) {
  26. return std::make_unique<FakeAudioLogImpl>();
  27. }
  28. } // namespace media