mirror of https://github.com/PCSX2/pcsx2.git
USB: remove lingering `if` and lock pulseaudio's recording ringbuffer earlier just in case
This commit is contained in:
parent
9cfe1b88fc
commit
3f9ea1d01b
|
@ -743,10 +743,11 @@ namespace usb_mic
|
|||
if (padev->mPaused /*|| dur > 5000*/ || (!padata && nbytes /* hole */))
|
||||
{
|
||||
ret = pa_stream_drop(p);
|
||||
if (ret != PA_OK)
|
||||
return;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(padev->mMutex);
|
||||
|
||||
padev->mInBuffer.write((uint8_t*)padata, nbytes);
|
||||
|
||||
//if copy succeeded, drop samples at pulse's side
|
||||
|
@ -781,7 +782,6 @@ namespace usb_mic
|
|||
break; //TODO happens?
|
||||
padev->mInBuffer.read<float>(samples);
|
||||
}
|
||||
std::lock_guard<std::mutex> lock(padev->mMutex);
|
||||
|
||||
size_t output_samples = output_frames_gen * padev->GetChannels();
|
||||
float* pSrc = rebuf.data();
|
||||
|
|
Loading…
Reference in New Issue