Index: webrtc/modules/audio_device/audio_device_buffer.cc |
diff --git a/webrtc/modules/audio_device/audio_device_buffer.cc b/webrtc/modules/audio_device/audio_device_buffer.cc |
index 48ae88ee90477e7ec4b5c5b132a2840b9116c68e..0bc2f5c225f55a04c30e12a52e11781de9f05744 100644 |
--- a/webrtc/modules/audio_device/audio_device_buffer.cc |
+++ b/webrtc/modules/audio_device/audio_device_buffer.cc |
@@ -313,7 +313,7 @@ int32_t AudioDeviceBuffer::StartInputFileRecording( |
_recFile.Flush(); |
_recFile.CloseFile(); |
- return (_recFile.OpenFile(fileName, false, false, false)); |
+ return _recFile.OpenFile(fileName, false) ? 0 : -1; |
} |
// ---------------------------------------------------------------------------- |
@@ -346,7 +346,7 @@ int32_t AudioDeviceBuffer::StartOutputFileRecording( |
_playFile.Flush(); |
_playFile.CloseFile(); |
- return (_playFile.OpenFile(fileName, false, false, false)); |
+ return _playFile.OpenFile(fileName, false) ? 0 : -1; |
} |
// ---------------------------------------------------------------------------- |
@@ -424,10 +424,9 @@ int32_t AudioDeviceBuffer::SetRecordedBuffer(const void* audioBuffer, |
} |
} |
- if (_recFile.Open()) |
- { |
- // write to binary file in mono or stereo (interleaved) |
- _recFile.Write(&_recBuffer[0], _recSize); |
+ if (_recFile.is_open()) { |
+ // write to binary file in mono or stereo (interleaved) |
+ _recFile.Write(&_recBuffer[0], _recSize); |
} |
return 0; |
@@ -572,10 +571,9 @@ int32_t AudioDeviceBuffer::GetPlayoutData(void* audioBuffer) |
memcpy(audioBuffer, &_playBuffer[0], _playSize); |
- if (_playFile.Open()) |
- { |
- // write to binary file in mono or stereo (interleaved) |
- _playFile.Write(&_playBuffer[0], _playSize); |
+ if (_playFile.is_open()) { |
+ // write to binary file in mono or stereo (interleaved) |
+ _playFile.Write(&_playBuffer[0], _playSize); |
} |
return static_cast<int32_t>(_playSamples); |