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

Unified Diff: webrtc/tools/force_mic_volume_max/force_mic_volume_max.cc

Issue 2965593002: Move webrtc/{tools => rtc_tools} (Closed)
Patch Set: Adding back root changes Created 3 years, 6 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/tools/event_log_visualizer/plot_python.cc ('k') | webrtc/tools/frame_analyzer/frame_analyzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/tools/force_mic_volume_max/force_mic_volume_max.cc
diff --git a/webrtc/tools/force_mic_volume_max/force_mic_volume_max.cc b/webrtc/tools/force_mic_volume_max/force_mic_volume_max.cc
deleted file mode 100644
index 0a2347d5bad1a243f657c75b98ad8ea041e0c0a9..0000000000000000000000000000000000000000
--- a/webrtc/tools/force_mic_volume_max/force_mic_volume_max.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-// This utility will portably force the volume of the default microphone to max.
-
-#include <stdio.h>
-
-#include "webrtc/modules/audio_device/include/audio_device.h"
-
-using webrtc::AudioDeviceModule;
-
-#if defined(_WIN32)
-#define DEFAULT_INPUT_DEVICE (AudioDeviceModule::kDefaultCommunicationDevice)
-#else
-#define DEFAULT_INPUT_DEVICE (0)
-#endif
-
-int main(int /*argc*/, char** /*argv*/) {
- // Create and initialize the ADM.
- rtc::scoped_refptr<AudioDeviceModule> adm(
- AudioDeviceModule::Create(1, AudioDeviceModule::kPlatformDefaultAudio));
- if (!adm.get()) {
- fprintf(stderr, "Failed to create Audio Device Module.\n");
- return 1;
- }
- if (adm->Init() != 0) {
- fprintf(stderr, "Failed to initialize Audio Device Module.\n");
- return 1;
- }
- if (adm->SetRecordingDevice(DEFAULT_INPUT_DEVICE) != 0) {
- fprintf(stderr, "Failed to set the default input device.\n");
- return 1;
- }
- if (adm->InitMicrophone() != 0) {
- fprintf(stderr, "Failed to to initialize the microphone.\n");
- return 1;
- }
-
- // Set mic volume to max.
- uint32_t max_vol = 0;
- if (adm->MaxMicrophoneVolume(&max_vol) != 0) {
- fprintf(stderr, "Failed to get max volume.\n");
- return 1;
- }
- if (adm->SetMicrophoneVolume(max_vol) != 0) {
- fprintf(stderr, "Failed to set mic volume.\n");
- return 1;
- }
-
- return 0;
-}
« no previous file with comments | « webrtc/tools/event_log_visualizer/plot_python.cc ('k') | webrtc/tools/frame_analyzer/frame_analyzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698