• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3  *
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
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 /*
12  *  Android audio device utility implementation
13  */
14 
15 #include "webrtc/modules/audio_device/android/audio_device_utility_android.h"
16 
17 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
18 #include "webrtc/system_wrappers/interface/trace.h"
19 
20 namespace webrtc
21 {
22 
AudioDeviceUtilityAndroid(const int32_t id)23 AudioDeviceUtilityAndroid::AudioDeviceUtilityAndroid(const int32_t id) :
24     _critSect(*CriticalSectionWrapper::CreateCriticalSection()), _id(id)
25 {
26     WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, id,
27                  "%s created", __FUNCTION__);
28 }
29 
~AudioDeviceUtilityAndroid()30 AudioDeviceUtilityAndroid::~AudioDeviceUtilityAndroid()
31 {
32     WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id,
33                  "%s destroyed", __FUNCTION__);
34     {
35         CriticalSectionScoped lock(&_critSect);
36     }
37 
38     delete &_critSect;
39 }
40 
Init()41 int32_t AudioDeviceUtilityAndroid::Init()
42 {
43 
44     WEBRTC_TRACE(kTraceStateInfo, kTraceAudioDevice, _id,
45                  "  OS info: %s", "Android");
46 
47     return 0;
48 }
49 
50 }  // namespace webrtc
51