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

Side by Side Diff: modules/audio_device/include/audio_device.h

Issue 3019563002: Prepare to remove ADM APIs that are to be deprecated. (Closed)
Patch Set: rebase Created 3 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 kChannelRight = 1, 45 kChannelRight = 1,
46 kChannelBoth = 2 46 kChannelBoth = 2
47 }; 47 };
48 48
49 public: 49 public:
50 // Create an ADM. 50 // Create an ADM.
51 static rtc::scoped_refptr<AudioDeviceModule> Create( 51 static rtc::scoped_refptr<AudioDeviceModule> Create(
52 const int32_t id, 52 const int32_t id,
53 const AudioLayer audio_layer); 53 const AudioLayer audio_layer);
54 54
55 // TODO(solenberg): Remove temporary implementation of Module interface.
56 int64_t TimeUntilNextProcess() override {
57 // Make sure Process() isn't called very often.
58 return 1000000;
59 }
60 void Process() override {}
61
55 // Retrieve the currently utilized audio layer 62 // Retrieve the currently utilized audio layer
56 virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const = 0; 63 virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const = 0;
57 64
58 // Error handling 65 // Error handling
59 virtual ErrorCode LastError() const = 0; 66 virtual ErrorCode LastError() const = 0;
60 virtual int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) = 0; 67 virtual int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) {
68 return 0;
69 }
61 70
62 // Full-duplex transportation of PCM audio 71 // Full-duplex transportation of PCM audio
63 virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) = 0; 72 virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) = 0;
64 73
65 // Main initialization and termination 74 // Main initialization and termination
66 virtual int32_t Init() = 0; 75 virtual int32_t Init() = 0;
67 virtual int32_t Terminate() = 0; 76 virtual int32_t Terminate() = 0;
68 virtual bool Initialized() const = 0; 77 virtual bool Initialized() const = 0;
69 78
70 // Device enumeration 79 // Device enumeration
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 virtual int GetRecordAudioParameters(AudioParameters* params) const = 0; 182 virtual int GetRecordAudioParameters(AudioParameters* params) const = 0;
174 #endif // WEBRTC_IOS 183 #endif // WEBRTC_IOS
175 184
176 protected: 185 protected:
177 ~AudioDeviceModule() override {} 186 ~AudioDeviceModule() override {}
178 }; 187 };
179 188
180 } // namespace webrtc 189 } // namespace webrtc
181 190
182 #endif // MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_ 191 #endif // MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698