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

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

Issue 2582703003: Audio output debug recording. (Closed)
Patch Set: Control through AudioManager. Compiles on Linux, works with PulseAudio. 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_AUDIO_OUTPUT_PROXY_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_OUTPUT_PROXY_H_
6 #define MEDIA_AUDIO_AUDIO_OUTPUT_PROXY_H_ 6 #define MEDIA_AUDIO_AUDIO_OUTPUT_PROXY_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 19 matching lines...) Expand all
30 public: 30 public:
31 // Caller keeps ownership of |dispatcher|. 31 // Caller keeps ownership of |dispatcher|.
32 explicit AudioOutputProxy(base::WeakPtr<AudioOutputDispatcher> dispatcher); 32 explicit AudioOutputProxy(base::WeakPtr<AudioOutputDispatcher> dispatcher);
33 33
34 // AudioOutputStream interface. 34 // AudioOutputStream interface.
35 bool Open() override; 35 bool Open() override;
36 void Start(AudioSourceCallback* callback) override; 36 void Start(AudioSourceCallback* callback) override;
37 void Stop() override; 37 void Stop() override;
38 void SetVolume(double volume) override; 38 void SetVolume(double volume) override;
39 void GetVolume(double* volume) override; 39 void GetVolume(double* volume) override;
40 void EnableDebugRecording(const base::FilePath& file_name) override;
41 void DisableDebugRecording() override;
40 void Close() override; 42 void Close() override;
41 43
42 AudioOutputDispatcher* get_dispatcher_for_testing() const { 44 AudioOutputDispatcher* get_dispatcher_for_testing() const {
43 return dispatcher_.get(); 45 return dispatcher_.get();
44 } 46 }
45 47
46 private: 48 private:
47 enum State { 49 enum State {
48 kCreated, 50 kCreated,
49 kOpened, 51 kOpened,
(...skipping 11 matching lines...) Expand all
61 // Need to save volume here, so that we can restore it in case the stream 63 // Need to save volume here, so that we can restore it in case the stream
62 // is stopped, and then started again. 64 // is stopped, and then started again.
63 double volume_; 65 double volume_;
64 66
65 DISALLOW_COPY_AND_ASSIGN(AudioOutputProxy); 67 DISALLOW_COPY_AND_ASSIGN(AudioOutputProxy);
66 }; 68 };
67 69
68 } // namespace media 70 } // namespace media
69 71
70 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_PROXY_H_ 72 #endif // MEDIA_AUDIO_AUDIO_OUTPUT_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698