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 #include "webrtc/modules/audio_device/linux/audio_device_utility_linux.h"
12 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
13 #include "webrtc/system_wrappers/interface/trace.h"
14
15 namespace webrtc
16 {
17
AudioDeviceUtilityLinux(const int32_t id)18 AudioDeviceUtilityLinux::AudioDeviceUtilityLinux(const int32_t id) :
19 _critSect(*CriticalSectionWrapper::CreateCriticalSection()), _id(id)
20 {
21 WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, id,
22 "%s created", __FUNCTION__);
23 }
24
~AudioDeviceUtilityLinux()25 AudioDeviceUtilityLinux::~AudioDeviceUtilityLinux()
26 {
27 WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id,
28 "%s destroyed", __FUNCTION__);
29 {
30 CriticalSectionScoped lock(&_critSect);
31
32 // free stuff here...
33 }
34
35 delete &_critSect;
36 }
37
38 // ============================================================================
39 // API
40 // ============================================================================
41
42
Init()43 int32_t AudioDeviceUtilityLinux::Init()
44 {
45
46 WEBRTC_TRACE(kTraceStateInfo, kTraceAudioDevice, _id,
47 " OS info: %s", "Linux");
48
49 return 0;
50 }
51
52
53 } // namespace webrtc
54