OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 // This utility will portably force the volume of the default microphone to max. | 11 // This utility will portably force the volume of the default microphone to max. |
12 | 12 |
13 #include <stdio.h> | 13 #include <stdio.h> |
14 | 14 |
15 #include "webrtc/base/scoped_ptr.h" | |
16 #include "webrtc/test/channel_transport/channel_transport.h" | 15 #include "webrtc/test/channel_transport/channel_transport.h" |
17 #include "webrtc/voice_engine/include/voe_audio_processing.h" | 16 #include "webrtc/voice_engine/include/voe_audio_processing.h" |
18 #include "webrtc/voice_engine/include/voe_base.h" | 17 #include "webrtc/voice_engine/include/voe_base.h" |
19 #include "webrtc/voice_engine/include/voe_volume_control.h" | 18 #include "webrtc/voice_engine/include/voe_volume_control.h" |
20 | 19 |
21 int main(int argc, char** argv) { | 20 int main(int argc, char** argv) { |
22 webrtc::VoiceEngine* voe = webrtc::VoiceEngine::Create(); | 21 webrtc::VoiceEngine* voe = webrtc::VoiceEngine::Create(); |
23 if (voe == NULL) { | 22 if (voe == NULL) { |
24 fprintf(stderr, "Failed to initialize voice engine.\n"); | 23 fprintf(stderr, "Failed to initialize voice engine.\n"); |
25 return 1; | 24 return 1; |
(...skipping 12 matching lines...) Expand all Loading... |
38 fprintf(stderr, "Failed set volume to 0.\n"); | 37 fprintf(stderr, "Failed set volume to 0.\n"); |
39 return 1; | 38 return 1; |
40 } | 39 } |
41 if (volume_control->SetMicVolume(255) != 0) { | 40 if (volume_control->SetMicVolume(255) != 0) { |
42 fprintf(stderr, "Failed set volume to 255.\n"); | 41 fprintf(stderr, "Failed set volume to 255.\n"); |
43 return 1; | 42 return 1; |
44 } | 43 } |
45 | 44 |
46 return 0; | 45 return 0; |
47 } | 46 } |
OLD | NEW |