[Cleanup] Remove write-only member _sndCardRecDelay.
The code was doing nothing except for triggering thread sanitizer, since concurrent writes weren't guarded: * ReadRecordedData() through webrtc_audio_module_rec_thread * InitPlayout() through main thread Bug: webrtc:9751 Change-Id: I7ecf4fa436ff0695e5b998d7e3f159fb6c7e9214 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/146216 Reviewed-by: Henrik Andreassson <henrika@webrtc.org> Commit-Queue: Yves Gerey <yvesg@google.com> Cr-Commit-Position: refs/heads/master@{#28636}
This commit is contained in:
@ -50,7 +50,6 @@ AudioDeviceLinuxPulse::AudioDeviceLinuxPulse()
|
||||
update_speaker_volume_at_startup_(false),
|
||||
quit_(false),
|
||||
_sndCardPlayDelay(0),
|
||||
_sndCardRecDelay(0),
|
||||
_writeErrors(0),
|
||||
_deviceIndex(-1),
|
||||
_numPlayDevices(0),
|
||||
@ -944,7 +943,6 @@ int32_t AudioDeviceLinuxPulse::InitPlayout() {
|
||||
// Mark playout side as initialized
|
||||
_playIsInitialized = true;
|
||||
_sndCardPlayDelay = 0;
|
||||
_sndCardRecDelay = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1214,7 +1212,6 @@ int32_t AudioDeviceLinuxPulse::StopPlayout() {
|
||||
_playIsInitialized = false;
|
||||
_playing = false;
|
||||
_sndCardPlayDelay = 0;
|
||||
_sndCardRecDelay = 0;
|
||||
|
||||
RTC_LOG(LS_VERBOSE) << "stopping playback";
|
||||
|
||||
@ -1891,8 +1888,6 @@ int32_t AudioDeviceLinuxPulse::ReadRecordedData(const void* bufferData,
|
||||
(uint32_t)((LatencyUsecs(_recStream) / 1000) +
|
||||
10 * ((size + _recordBufferUsed) / _recordBufferSize));
|
||||
|
||||
_sndCardRecDelay = recDelay;
|
||||
|
||||
if (_playStream) {
|
||||
// Get the playout delay.
|
||||
_sndCardPlayDelay = (uint32_t)(LatencyUsecs(_playStream) / 1000);
|
||||
@ -2257,8 +2252,6 @@ bool AudioDeviceLinuxPulse::RecThreadProcess() {
|
||||
break;
|
||||
}
|
||||
|
||||
_sndCardRecDelay = (uint32_t)(LatencyUsecs(_recStream) / 1000);
|
||||
|
||||
// Drop lock for sigslot dispatch, which could take a while.
|
||||
PaUnLock();
|
||||
// Read data and provide it to VoiceEngine
|
||||
|
||||
Reference in New Issue
Block a user