Index: webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc |
diff --git a/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc b/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc |
index bdbccde05012ec35cd71048008e5a0182216fa57..279900654f64264e0ab8764bfb53c7b5f0bdee16 100644 |
--- a/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc |
+++ b/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc |
@@ -155,25 +155,21 @@ int32_t AudioDeviceLinuxALSA::ActiveAudioLayer( |
return 0; |
} |
-int32_t AudioDeviceLinuxALSA::Init() |
-{ |
- |
- CriticalSectionScoped lock(&_critSect); |
+AudioDeviceGeneric::InitStatus AudioDeviceLinuxALSA::Init() { |
+ CriticalSectionScoped lock(&_critSect); |
- // Load libasound |
- if (!AlsaSymbolTable.Load()) |
- { |
- // Alsa is not installed on |
- // this system |
- WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id, |
- " failed to load symbol table"); |
- return -1; |
- } |
+ // Load libasound |
+ if (!AlsaSymbolTable.Load()) { |
+ // Alsa is not installed on |
+ // this system |
+ WEBRTC_TRACE(kTraceError, kTraceAudioDevice, _id, |
+ " failed to load symbol table"); |
+ return InitStatus::kOtherError; |
+ } |
- if (_initialized) |
- { |
- return 0; |
- } |
+ if (_initialized) { |
+ return InitStatus::kOk; |
+ } |
#if defined(USE_X11) |
//Get X display handle for typing detection |
_XDisplay = XOpenDisplay(NULL); |
@@ -190,7 +186,7 @@ int32_t AudioDeviceLinuxALSA::Init() |
_initialized = true; |
- return 0; |
+ return InitStatus::kOk; |
} |
int32_t AudioDeviceLinuxALSA::Terminate() |