• 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 #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 
17 namespace webrtc {
AudioDeviceUtilityIPhone(const int32_t id)18 AudioDeviceUtilityIPhone::AudioDeviceUtilityIPhone(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 
~AudioDeviceUtilityIPhone()27 AudioDeviceUtilityIPhone::~AudioDeviceUtilityIPhone() {
28     WEBRTC_TRACE(kTraceMemory, kTraceAudioDevice, _id,
29                  "%s destroyed", __FUNCTION__);
30     CriticalSectionScoped lock(&_critSect);
31 
32     delete &_critSect;
33 }
34 
Init()35 int32_t AudioDeviceUtilityIPhone::Init() {
36     WEBRTC_TRACE(kTraceModuleCall, kTraceAudioDevice, _id,
37                  "%s", __FUNCTION__);
38 
39     WEBRTC_TRACE(kTraceStateInfo, kTraceAudioDevice, _id,
40                  "  OS info: %s", "iOS");
41 
42     return 0;
43 }
44 
45 }  // namespace webrtc
46