Remove AudioDeviceObserver and make ADM not inherit from the Module interface.

(Re-upload of https://codereview.webrtc.org/3020493002/)

Bug: webrtc:4690, webrtc:7306
Change-Id: I67fb9ebca1296aabc08eae8a292a5c69832dc35e
Reviewed-on: https://webrtc-review.googlesource.com/5360
Commit-Queue: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20083}
This commit is contained in:
Fredrik Solenberg
2017-10-02 14:55:33 +02:00
committed by Commit Bot
parent c007857ab9
commit 34cdd2d402
35 changed files with 14 additions and 698 deletions

View File

@ -12,12 +12,12 @@
#define MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_
#include "modules/audio_device/include/audio_device_defines.h"
#include "modules/include/module.h"
#include "rtc_base/scoped_ref_ptr.h"
#include "rtc_base/refcount.h"
namespace webrtc {
class AudioDeviceModule : public RefCountedModule {
class AudioDeviceModule : public rtc::RefCountInterface {
public:
enum ErrorCode {
kAdmErrNone = 0,
@ -52,21 +52,11 @@ class AudioDeviceModule : public RefCountedModule {
const int32_t id,
const AudioLayer audio_layer);
// TODO(solenberg): Remove temporary implementation of Module interface.
int64_t TimeUntilNextProcess() override {
// Make sure Process() isn't called very often.
return 1000000;
}
void Process() override {}
// Retrieve the currently utilized audio layer
virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const = 0;
// Error handling
virtual ErrorCode LastError() const = 0;
virtual int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) {
return 0;
}
// Full-duplex transportation of PCM audio
virtual int32_t RegisterAudioCallback(AudioTransport* audioCallback) = 0;