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

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

Issue 3020493002: Remove AudioDeviceObserver and make ADM not inherit from the Module interface.
Patch Set: linux build error 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
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 26 matching lines...) Expand all
37 kPlatformIOS = 6 37 kPlatformIOS = 6
38 }; 38 };
39 39
40 int32_t CheckPlatform(); 40 int32_t CheckPlatform();
41 int32_t CreatePlatformSpecificObjects(); 41 int32_t CreatePlatformSpecificObjects();
42 int32_t AttachAudioBuffer(); 42 int32_t AttachAudioBuffer();
43 43
44 AudioDeviceModuleImpl(const int32_t id, const AudioLayer audioLayer); 44 AudioDeviceModuleImpl(const int32_t id, const AudioLayer audioLayer);
45 ~AudioDeviceModuleImpl() override; 45 ~AudioDeviceModuleImpl() override;
46 46
47 int64_t TimeUntilNextProcess() override;
48 void Process() override;
49
50 // Retrieve the currently utilized audio layer 47 // Retrieve the currently utilized audio layer
51 int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override; 48 int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override;
52 49
53 // Error handling 50 // Error handling
54 ErrorCode LastError() const override; 51 ErrorCode LastError() const override;
55 int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) override;
56 52
57 // Full-duplex transportation of PCM audio 53 // Full-duplex transportation of PCM audio
58 int32_t RegisterAudioCallback(AudioTransport* audioCallback) override; 54 int32_t RegisterAudioCallback(AudioTransport* audioCallback) override;
59 55
60 // Main initializaton and termination 56 // Main initializaton and termination
61 int32_t Init() override; 57 int32_t Init() override;
62 int32_t Terminate() override; 58 int32_t Terminate() override;
63 bool Initialized() const override; 59 bool Initialized() const override;
64 60
65 // Device enumeration 61 // Device enumeration
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return _audioManagerAndroid.get(); 167 return _audioManagerAndroid.get();
172 } 168 }
173 #endif 169 #endif
174 AudioDeviceBuffer* GetAudioDeviceBuffer() { return &_audioDeviceBuffer; } 170 AudioDeviceBuffer* GetAudioDeviceBuffer() { return &_audioDeviceBuffer; }
175 171
176 private: 172 private:
177 PlatformType Platform() const; 173 PlatformType Platform() const;
178 AudioLayer PlatformAudioLayer() const; 174 AudioLayer PlatformAudioLayer() const;
179 175
180 rtc::CriticalSection _critSect; 176 rtc::CriticalSection _critSect;
181 rtc::CriticalSection _critSectEventCb;
182 rtc::CriticalSection _critSectAudioCb; 177 rtc::CriticalSection _critSectAudioCb;
183 178
184 AudioDeviceObserver* _ptrCbAudioDeviceObserver;
185
186 AudioDeviceGeneric* _ptrAudioDevice; 179 AudioDeviceGeneric* _ptrAudioDevice;
187 180
188 AudioDeviceBuffer _audioDeviceBuffer; 181 AudioDeviceBuffer _audioDeviceBuffer;
189 #if defined(WEBRTC_ANDROID) 182 #if defined(WEBRTC_ANDROID)
190 std::unique_ptr<AudioManager> _audioManagerAndroid; 183 std::unique_ptr<AudioManager> _audioManagerAndroid;
191 #endif 184 #endif
192 int32_t _id; 185 int32_t _id;
193 AudioLayer _platformAudioLayer; 186 AudioLayer _platformAudioLayer;
194 int64_t _lastProcessTime;
195 PlatformType _platformType; 187 PlatformType _platformType;
196 bool _initialized; 188 bool _initialized;
197 mutable ErrorCode _lastError; 189 mutable ErrorCode _lastError;
198 }; 190 };
199 191
200 } // namespace webrtc 192 } // namespace webrtc
201 193
202 #endif // defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE) 194 #endif // defined(WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE)
203 195
204 #endif // MODULES_INTERFACE_AUDIO_DEVICE_IMPL_H_ 196 #endif // MODULES_INTERFACE_AUDIO_DEVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698