Delete deprecated PlatformThread looping
Bug: webrtc:10594, webrtc:7187 Change-Id: Icba3a5cf6dbe817ead427c27645b3ad7bc8819be Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/134642 Commit-Queue: Niels Moller <nisse@webrtc.org> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org> Reviewed-by: Tommi <tommi@webrtc.org> Cr-Commit-Position: refs/heads/master@{#27833}
This commit is contained in:
@ -1027,10 +1027,10 @@ int32_t AudioDeviceLinuxALSA::StartRecording() {
|
||||
}
|
||||
// RECORDING
|
||||
_ptrThreadRec.reset(new rtc::PlatformThread(
|
||||
RecThreadFunc, this, "webrtc_audio_module_capture_thread"));
|
||||
RecThreadFunc, this, "webrtc_audio_module_capture_thread",
|
||||
rtc::kRealtimePriority));
|
||||
|
||||
_ptrThreadRec->Start();
|
||||
_ptrThreadRec->SetPriority(rtc::kRealtimePriority);
|
||||
|
||||
errVal = LATE(snd_pcm_prepare)(_handleRecord);
|
||||
if (errVal < 0) {
|
||||
@ -1145,9 +1145,9 @@ int32_t AudioDeviceLinuxALSA::StartPlayout() {
|
||||
|
||||
// PLAYOUT
|
||||
_ptrThreadPlay.reset(new rtc::PlatformThread(
|
||||
PlayThreadFunc, this, "webrtc_audio_module_play_thread"));
|
||||
PlayThreadFunc, this, "webrtc_audio_module_play_thread",
|
||||
rtc::kRealtimePriority));
|
||||
_ptrThreadPlay->Start();
|
||||
_ptrThreadPlay->SetPriority(rtc::kRealtimePriority);
|
||||
|
||||
int errVal = LATE(snd_pcm_prepare)(_handlePlayout);
|
||||
if (errVal < 0) {
|
||||
@ -1456,12 +1456,16 @@ int32_t AudioDeviceLinuxALSA::ErrorRecovery(int32_t error,
|
||||
// Thread Methods
|
||||
// ============================================================================
|
||||
|
||||
bool AudioDeviceLinuxALSA::PlayThreadFunc(void* pThis) {
|
||||
return (static_cast<AudioDeviceLinuxALSA*>(pThis)->PlayThreadProcess());
|
||||
void AudioDeviceLinuxALSA::PlayThreadFunc(void* pThis) {
|
||||
AudioDeviceLinuxALSA* device = static_cast<AudioDeviceLinuxALSA*>(pThis);
|
||||
while (device->PlayThreadProcess()) {
|
||||
}
|
||||
}
|
||||
|
||||
bool AudioDeviceLinuxALSA::RecThreadFunc(void* pThis) {
|
||||
return (static_cast<AudioDeviceLinuxALSA*>(pThis)->RecThreadProcess());
|
||||
void AudioDeviceLinuxALSA::RecThreadFunc(void* pThis) {
|
||||
AudioDeviceLinuxALSA* device = static_cast<AudioDeviceLinuxALSA*>(pThis);
|
||||
while (device->RecThreadProcess()) {
|
||||
}
|
||||
}
|
||||
|
||||
bool AudioDeviceLinuxALSA::PlayThreadProcess() {
|
||||
|
||||
Reference in New Issue
Block a user