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