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

Unified Diff: media/audio/win/audio_low_latency_input_win.cc

Issue 731373002: Enable MSVC warning for unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another Windows fix Created 6 years, 1 month 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
Index: media/audio/win/audio_low_latency_input_win.cc
diff --git a/media/audio/win/audio_low_latency_input_win.cc b/media/audio/win/audio_low_latency_input_win.cc
index d618d60ea92fb6f0d97140dbf53043d3ec05af42..67426d676c3b67ece374d879295aa07cc832b15b 100644
--- a/media/audio/win/audio_low_latency_input_win.cc
+++ b/media/audio/win/audio_low_latency_input_win.cc
@@ -240,9 +240,10 @@ void WASAPIAudioInputStream::SetVolume(double volume) {
// Set a new master volume level. Valid volume levels are in the range
// 0.0 to 1.0. Ignore volume-change events.
- HRESULT hr = simple_audio_volume_->SetMasterVolume(static_cast<float>(volume),
- NULL);
- DLOG_IF(WARNING, FAILED(hr)) << "Failed to set new input master volume.";
+ HRESULT hr =
+ simple_audio_volume_->SetMasterVolume(static_cast<float>(volume), NULL);
+ if (FAILED(hr))
+ DLOG(WARNING) << "Failed to set new input master volume.";
// Update the AGC volume level based on the last setting above. Note that,
// the volume-level resolution is not infinite and it is therefore not
@@ -260,7 +261,8 @@ double WASAPIAudioInputStream::GetVolume() {
// Retrieve the current volume level. The value is in the range 0.0 to 1.0.
float level = 0.0f;
HRESULT hr = simple_audio_volume_->GetMasterVolume(&level);
- DLOG_IF(WARNING, FAILED(hr)) << "Failed to get input master volume.";
+ if (FAILED(hr))
+ DLOG(WARNING) << "Failed to get input master volume.";
return static_cast<double>(level);
}
@@ -274,7 +276,8 @@ bool WASAPIAudioInputStream::IsMuted() {
// Retrieves the current muting state for the audio session.
BOOL is_muted = FALSE;
HRESULT hr = simple_audio_volume_->GetMute(&is_muted);
- DLOG_IF(WARNING, FAILED(hr)) << "Failed to get input master volume.";
+ if (FAILED(hr))
+ DLOG(WARNING) << "Failed to get input master volume.";
return is_muted != FALSE;
}
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc ('k') | mojo/public/cpp/system/tests/macros_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698