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

Unified Diff: webrtc/media/engine/webrtcvoiceengine.cc

Issue 2670183005: Change order of tear down/create of default audio stream, to avoid starting/stopping audio card pla… (Closed)
Patch Set: rebase Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvoiceengine.cc
diff --git a/webrtc/media/engine/webrtcvoiceengine.cc b/webrtc/media/engine/webrtcvoiceengine.cc
index 7029e5b1f5a4aa7832f5ba3c85732ce50935ee49..2db552611220775e67f4f82a936ec949d2b01934 100644
--- a/webrtc/media/engine/webrtcvoiceengine.cc
+++ b/webrtc/media/engine/webrtcvoiceengine.cc
@@ -2499,14 +2499,6 @@ void WebRtcVoiceMediaChannel::OnPacketReceived(
return;
}
- if (default_recv_ssrc_ != -1) {
- LOG(LS_INFO) << "Removing default receive stream with ssrc "
- << default_recv_ssrc_;
- RTC_DCHECK_NE(ssrc, default_recv_ssrc_);
- RemoveRecvStream(default_recv_ssrc_);
- default_recv_ssrc_ = -1;
- }
-
StreamParams sp;
sp.ssrcs.push_back(ssrc);
LOG(LS_INFO) << "Creating default receive stream for SSRC=" << ssrc << ".";
@@ -2514,7 +2506,14 @@ void WebRtcVoiceMediaChannel::OnPacketReceived(
LOG(LS_WARNING) << "Could not create default receive stream.";
return;
}
+ if (default_recv_ssrc_ != -1) {
+ LOG(LS_INFO) << "Removing default receive stream with ssrc "
+ << default_recv_ssrc_;
+ RTC_DCHECK_NE(ssrc, default_recv_ssrc_);
+ RemoveRecvStream(default_recv_ssrc_);
+ }
default_recv_ssrc_ = ssrc;
+
SetOutputVolume(default_recv_ssrc_, default_recv_volume_);
if (default_sink_) {
std::unique_ptr<webrtc::AudioSinkInterface> proxy_sink(
« 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