USB: fix singstar & tangling if/comments

This commit is contained in:
Gauvain 'GovanifY' Roussel-Tarbouriech 2020-11-05 22:03:03 +01:00 committed by refractionpcsx2
parent 3279cba559
commit d2fa215aa9
4 changed files with 2 additions and 13 deletions

View File

@ -1186,7 +1186,6 @@ void ohci_frame_boundary(void* opaque)
/* if reset bit was set, don't process possibly invalid descriptors */
/* TODO intr_status is interrupts that driver wants, so not quite right to us it here */
bool hack = false; // ohci->intr_status & ohci->intr & OHCI_INTR_RHSC;
if (hack)
/* Process all the lists at the end of the frame */
if ((ohci->ctl & OHCI_CTL_PLE) && !hack)

View File

@ -747,8 +747,6 @@ namespace usb_mic
return;
}
if (padev->mInBuffer.capacity() < nbytes)
padev->mInBuffer.write((uint8_t*)padata, nbytes);
//if copy succeeded, drop samples at pulse's side
@ -783,14 +781,6 @@ namespace usb_mic
break; //TODO happens?
padev->mInBuffer.read<float>(samples);
}
/*
nbytes,
nbytes / sizeof(float) / padev->GetChannels(),
input_frames_used,
padev->mInBuffer.peek_read(),
output_frames_gen);*/
std::lock_guard<std::mutex> lock(padev->mMutex);
size_t output_samples = output_frames_gen * padev->GetChannels();

View File

@ -76,8 +76,6 @@ namespace usb_mic
LARGE_INTEGER currentTime;
QueryPerformanceCounter(&currentTime);
if (currentTime.QuadPart < lastQPCTime)
lastQPCTime = currentTime.QuadPart;
double timeVal = double(currentTime.QuadPart);

View File

@ -274,6 +274,7 @@ namespace usb_pad
ie.code = FF_AUTOCENTER;
ie.value = value * 0xFFFFUL / 100;
write(mHandle, &ie, sizeof(ie));
}
void EvdevFF::SetGain(int gain /* between 0 and 100 */)
@ -284,6 +285,7 @@ namespace usb_pad
ie.code = FF_GAIN;
ie.value = 0xFFFFUL * gain / 100;
write(mHandle, &ie, sizeof(ie));
}
} // namespace evdev