OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 |
| 5 #ifndef MEDIA_AUDIO_FAKE_AUDIO_FILE_WRITER_H_ |
| 6 #define MEDIA_AUDIO_FAKE_AUDIO_FILE_WRITER_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" |
| 10 #include "media/audio/audio_file_writer.h" |
| 11 #include "media/base/media_export.h" |
| 12 |
| 13 namespace media { |
| 14 |
| 15 // Creates fake AudioFileWriter that does nothing. Used by tests. |
| 16 class MEDIA_EXPORT FakeAudioFileWriter |
| 17 : NON_EXPORTED_BASE(public AudioFileWriter) { |
| 18 public: |
| 19 FakeAudioFileWriter(); |
| 20 ~FakeAudioFileWriter() override; |
| 21 void Start(const base::FilePath& file) override; |
| 22 void Stop() override; |
| 23 void Write(std::unique_ptr<AudioBus> data) override; |
| 24 bool WillWrite() override; |
| 25 |
| 26 // Simple create function that can be passed as a callback. |
| 27 static std::unique_ptr<media::AudioFileWriter> Create( |
| 28 const media::AudioParameters& params); |
| 29 |
| 30 private: |
| 31 DISALLOW_COPY_AND_ASSIGN(FakeAudioFileWriter); |
| 32 }; |
| 33 |
| 34 } // namspace media |
| 35 |
| 36 #endif // MEDIA_AUDIO_FAKE_AUDIO_FILE_WRITER_H_ |
OLD | NEW |