Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(551)

Side by Side Diff: media/audio/fake_audio_output_stream.h

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Code review (dalecurtis@ and maxmorin@). Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #ifndef MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ 5 #ifndef MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_
6 #define MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ 6 #define MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 static AudioOutputStream* MakeFakeStream(AudioManagerBase* manager, 24 static AudioOutputStream* MakeFakeStream(AudioManagerBase* manager,
25 const AudioParameters& params); 25 const AudioParameters& params);
26 26
27 // AudioOutputStream implementation. 27 // AudioOutputStream implementation.
28 bool Open() override; 28 bool Open() override;
29 void Start(AudioSourceCallback* callback) override; 29 void Start(AudioSourceCallback* callback) override;
30 void Stop() override; 30 void Stop() override;
31 void SetVolume(double volume) override; 31 void SetVolume(double volume) override;
32 void GetVolume(double* volume) override; 32 void GetVolume(double* volume) override;
33 void EnableDebugRecording(const base::FilePath& file_name) override {}
34 void DisableDebugRecording() override {}
33 void Close() override; 35 void Close() override;
34 36
35 private: 37 private:
36 FakeAudioOutputStream(AudioManagerBase* manager, 38 FakeAudioOutputStream(AudioManagerBase* manager,
37 const AudioParameters& params); 39 const AudioParameters& params);
38 ~FakeAudioOutputStream() override; 40 ~FakeAudioOutputStream() override;
39 41
40 // Task that periodically calls OnMoreData() to consume audio data. 42 // Task that periodically calls OnMoreData() to consume audio data.
41 void CallOnMoreData(); 43 void CallOnMoreData();
42 44
43 AudioManagerBase* audio_manager_; 45 AudioManagerBase* audio_manager_;
44 AudioSourceCallback* callback_; 46 AudioSourceCallback* callback_;
45 FakeAudioWorker fake_worker_; 47 FakeAudioWorker fake_worker_;
46 std::unique_ptr<AudioBus> audio_bus_; 48 std::unique_ptr<AudioBus> audio_bus_;
47 49
48 DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputStream); 50 DISALLOW_COPY_AND_ASSIGN(FakeAudioOutputStream);
49 }; 51 };
50 52
51 } // namespace media 53 } // namespace media
52 54
53 #endif // MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_ 55 #endif // MEDIA_AUDIO_FAKE_AUDIO_OUTPUT_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698