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/audio_device_config.h"
12#include "webrtc/modules/audio_device/ios/audio_device_utility_ios.h"
13
14#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
15#include "webrtc/system_wrappers/interface/trace.h"
16
17namespace webrtc {
18AudioDeviceUtilityIOS::AudioDeviceUtilityIOS(const int32_t id)
19:
20    _critSect(*CriticalSectionWrapper::CreateCriticalSection()),
21    _id(id),
22    _lastError(AudioDeviceModule::kAdmErrNone) {
23    WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, id,
24                 "%s created", __FUNCTION__);
25}
26
27AudioDeviceUtilityIOS::~AudioDeviceUtilityIOS() {
28    WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id,
29                 "%s destroyed", __FUNCTION__);
30    {
31        CriticalSectionScoped lock(&_critSect);
32    }
33    delete &_critSect;
34}
35
36int32_t AudioDeviceUtilityIOS::Init() {
37    WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
38                 "%s", __FUNCTION__);
39
40    WEBRTC_TRACE(kTraceStateInfo, kTraceAudioDevice, _id,
41                 "  OS info: %s", "iOS");
42
43    return 0;
44}
45
46}  // namespace webrtc
47