Index: webrtc/modules/audio_device/dummy/file_audio_device.cc |
diff --git a/webrtc/modules/audio_device/dummy/file_audio_device.cc b/webrtc/modules/audio_device/dummy/file_audio_device.cc |
index bbc4dd8c4df923fe6657c568c19df16cebcf197f..777086855eb9cbd0269ef9b220ce40c64d3a1e30 100644 |
--- a/webrtc/modules/audio_device/dummy/file_audio_device.cc |
+++ b/webrtc/modules/audio_device/dummy/file_audio_device.cc |
@@ -7,6 +7,7 @@ |
* in the file PATENTS. All contributing project authors may |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
+#include "webrtc/base/logging.h" |
#include "webrtc/base/platform_thread.h" |
#include "webrtc/modules/audio_device/dummy/file_audio_device.h" |
#include "webrtc/system_wrappers/include/sleep.h" |
@@ -198,7 +199,7 @@ int32_t FileAudioDevice::StartPlayout() { |
// PLAYOUT |
if (!_outputFilename.empty() && |
!_outputFile.OpenFile(_outputFilename.c_str(), false)) { |
- printf("Failed to open playout file %s!\n", _outputFilename.c_str()); |
+ LOG(LS_ERROR) << "Failed to open playout file: " << _outputFilename; |
_playing = false; |
delete [] _playoutBuffer; |
_playoutBuffer = NULL; |
@@ -209,6 +210,9 @@ int32_t FileAudioDevice::StartPlayout() { |
PlayThreadFunc, this, "webrtc_audio_module_play_thread")); |
_ptrThreadPlay->Start(); |
_ptrThreadPlay->SetPriority(rtc::kRealtimePriority); |
+ |
+ LOG(LS_INFO) << "Started playout capture to output file: " |
+ << _outputFilename; |
return 0; |
} |
@@ -230,6 +234,9 @@ int32_t FileAudioDevice::StopPlayout() { |
delete [] _playoutBuffer; |
_playoutBuffer = NULL; |
_outputFile.CloseFile(); |
+ |
+ LOG(LS_INFO) << "Stopped playout capture to output file: " |
+ << _outputFilename; |
return 0; |
} |
@@ -250,8 +257,7 @@ int32_t FileAudioDevice::StartRecording() { |
if (!_inputFilename.empty() && |
!_inputFile.OpenFile(_inputFilename.c_str(), true)) { |
- printf("Failed to open audio input file %s!\n", |
- _inputFilename.c_str()); |
+ LOG(LS_ERROR) << "Failed to open audio input file: " << _inputFilename; |
_recording = false; |
delete[] _recordingBuffer; |
_recordingBuffer = NULL; |
@@ -264,6 +270,9 @@ int32_t FileAudioDevice::StartRecording() { |
_ptrThreadRec->Start(); |
_ptrThreadRec->SetPriority(rtc::kRealtimePriority); |
+ LOG(LS_INFO) << "Started recording from input file: " |
+ << _inputFilename; |
+ |
return 0; |
} |
@@ -285,6 +294,10 @@ int32_t FileAudioDevice::StopRecording() { |
delete [] _recordingBuffer; |
_recordingBuffer = NULL; |
} |
+ _inputFile.CloseFile(); |
+ |
+ LOG(LS_INFO) << "Stopped recording from input file: " |
+ << _inputFilename; |
return 0; |
} |