Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Unified Diff: webrtc/modules/audio_device/audio_device_buffer.cc

Issue 2054373002: FileWrapper[Impl] modifications and actually remove the "Impl" class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix use of ASSERT instead of ASSERT_TRUE in test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/common_types.cc ('k') | webrtc/modules/audio_device/dummy/file_audio_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « webrtc/common_types.cc ('k') | webrtc/modules/audio_device/dummy/file_audio_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698