diff --git a/media/webrtc/signaling/src/media-conduit/AudioConduit.h b/media/webrtc/signaling/src/media-conduit/AudioConduit.h index a7af9f9ed943..e2104417c169 100644 --- a/media/webrtc/signaling/src/media-conduit/AudioConduit.h +++ b/media/webrtc/signaling/src/media-conduit/AudioConduit.h @@ -17,6 +17,7 @@ // Audio Engine Includes #include "webrtc/common_types.h" +#include "webrtc/modules/audio_device/include/fake_audio_device.h" #include "webrtc/voice_engine/include/voe_base.h" #include "webrtc/voice_engine/include/voe_volume_control.h" #include "webrtc/voice_engine/include/voe_codec.h" @@ -174,6 +175,7 @@ public: explicit WebrtcAudioConduit(): mVoiceEngine(nullptr), + mFakeAudioDevice(new webrtc::FakeAudioDeviceModule()), mTransportMonitor("WebrtcAudioConduit"), mTransmitterTransport(nullptr), mReceiverTransport(nullptr), @@ -297,6 +299,7 @@ private: void DumpCodecDB() const; webrtc::VoiceEngine* mVoiceEngine; + UniquePtr mFakeAudioDevice; mozilla::ReentrantMonitor mTransportMonitor; RefPtr mTransmitterTransport; RefPtr mReceiverTransport; @@ -334,6 +337,8 @@ private: uint32_t mLastTimestamp; + webrtc::AudioFrame mAudioFrame; // for output pulls + uint32_t mSamples; uint32_t mLastSyncLog; diff --git a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp index 74c9bef696cf..7e68c41b016f 100644 --- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp +++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.cpp @@ -2104,7 +2104,7 @@ public: if (source_->AppendToTrack(track_id_, &segment)) { played_ticks_ += frames; if (MOZ_LOG_TEST(AudioLogModule(), LogLevel::Debug)) { - if (played_ticks_ > last_log_ + graph->GraphRate()) { // ~ 1 second + if (played_ticks_ > last_log_ + rate) { // ~ 1 second MOZ_LOG(AudioLogModule(), LogLevel::Debug, ("%p: Inserting %zu samples into track %d, total = %" PRIu64, (void*) this, frames, track_id_, played_ticks_)); diff --git a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h index e7b0f1313b8c..25837a9961d0 100644 --- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h +++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h @@ -27,7 +27,6 @@ // Should come from MediaEngine.h, but that's a pain to include here // because of the MOZILLA_EXTERNAL_LINKAGE stuff. -#define WEBRTC_DEFAULT_SAMPLE_RATE 32000 #define WEBRTC_MAX_SAMPLE_RATE 48000 class nsIPrincipal; diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp index 06727d6038eb..b2a100447e5c 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp @@ -2269,6 +2269,7 @@ PeerConnectionImpl::InsertAudioLevelForContributingSource( break; } } + return NS_OK; }