Bug 1425596 - Stop busy looping in mFakeAudioDevice. r?jya draft
authorPaul Adenot <paul@paul.cx>
Fri, 15 Dec 2017 17:05:42 -0600
changeset 712304 9faf6cbba07d3fab09e64d746a88f67a07cf2cb2
parent 712244 13d38a61e8bf7148792f044378048332b660030e
child 744031 bd33610a8d79fdc6c835b70748d9cfcdbb721151
push id93310
push userpaul@paul.cx
push dateFri, 15 Dec 2017 23:06:05 +0000
reviewersjya
bugs1425596
milestone59.0a1
Bug 1425596 - Stop busy looping in mFakeAudioDevice. r?jya This is a workaround for the fact that our code is wrong. FakeAudioDeviceModule :::TimeUntilNextProcess() returns 0, so we're busy looping. I'm switching that to 100, which is arbitrary, but makes the problem go away. I want to fix that soon, because this is a terrible workaround. FakeAudioDeviceModule is _not_ made to be used in production. MozReview-Commit-ID: FoGs6GFsRRN
media/webrtc/trunk/webrtc/modules/audio_device/include/fake_audio_device.h
--- a/media/webrtc/trunk/webrtc/modules/audio_device/include/fake_audio_device.h
+++ b/media/webrtc/trunk/webrtc/modules/audio_device/include/fake_audio_device.h
@@ -34,17 +34,17 @@ class FakeAudioDeviceModule : public Aud
   virtual int32_t SetStereoPlayout(bool enable) { return 0; }
   virtual int32_t StopPlayout() { return 0; }
   virtual int32_t InitMicrophone() { return 0; }
   virtual int32_t SetRecordingDevice(uint16_t index) { return 0; }
   virtual int32_t SetRecordingDevice(WindowsDeviceType device) { return 0; }
   virtual int32_t SetStereoRecording(bool enable) { return 0; }
   virtual int32_t SetAGC(bool enable) { return 0; }
   virtual int32_t StopRecording() { return 0; }
-  virtual int64_t TimeUntilNextProcess() { return 0; }
+  virtual int64_t TimeUntilNextProcess() { return 100; }
   virtual void Process() {}
   virtual int32_t Terminate() { return 0; }
 
   virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const { return 0; }
   virtual ErrorCode LastError() const { return kAdmErrNone; }
   virtual bool Initialized() const { return true; }
   virtual int16_t PlayoutDevices() { return 0; }
   virtual int16_t RecordingDevices() { return 0; }