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

Unified Diff: webrtc/audio/audio_send_stream.cc

Issue 2721003002: Remove usage of VoEVolumeControl from WVoE and Audio[Send|Receive]Stream. (Closed)
Patch Set: rebase+comment 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 | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/audio/audio_send_stream.cc
diff --git a/webrtc/audio/audio_send_stream.cc b/webrtc/audio/audio_send_stream.cc
index ec18125427282d4624543bc45b274d2b1a42692e..2d0c99b33a6bb23358b72ca85176ad0679630d6e 100644
--- a/webrtc/audio/audio_send_stream.cc
+++ b/webrtc/audio/audio_send_stream.cc
@@ -25,7 +25,7 @@
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "webrtc/voice_engine/channel_proxy.h"
#include "webrtc/voice_engine/include/voe_base.h"
-#include "webrtc/voice_engine/include/voe_volume_control.h"
+#include "webrtc/voice_engine/transmit_mixer.h"
#include "webrtc/voice_engine/voice_engine_impl.h"
namespace webrtc {
@@ -193,16 +193,11 @@ webrtc::AudioSendStream::Stats AudioSendStream::GetStats() const {
}
}
- // Local speech level.
- {
- ScopedVoEInterface<VoEVolumeControl> volume(voice_engine());
- unsigned int level = 0;
- int error = volume->GetSpeechInputLevelFullRange(level);
- RTC_DCHECK_EQ(0, error);
- stats.audio_level = static_cast<int32_t>(level);
- }
-
ScopedVoEInterface<VoEBase> base(voice_engine());
+ RTC_DCHECK(base->transmit_mixer());
+ stats.audio_level = base->transmit_mixer()->AudioLevelFullRange();
+ RTC_DCHECK_LE(0, stats.audio_level);
+
RTC_DCHECK(base->audio_processing());
auto audio_processing_stats = base->audio_processing()->GetStatistics();
stats.echo_delay_median_ms = audio_processing_stats.delay_median;
« no previous file with comments | « webrtc/audio/audio_receive_stream.cc ('k') | webrtc/audio/audio_send_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698