Make serial receiver more reliable
Brought to you by:
dukeeeey
Because the timing in done on the CPU, if CPU usage is high, decoding will fail completely.
void CIRDriver::ThreadProc(void)
should be given real time priority
http://msdn.microsoft.com/en-us/library/windows/desktop/ms686277%28v=vs.85%29.aspx
The handle must have the THREAD_SET_INFORMATION access right.
The transmit part of the source messes with the priorities.
The decoding thread can also fail under high CPU load. In my audiocapture plugin I buffer the data until I think the end of the signal has been reached, and then I kick off decoding. This might help the serial plugin and decoding, or may not :)
Fixed in r244.
If the decoding is still unreliable, it might be because winlirc did not have enough privileges to boost its priority class to Realtime (non-admins only get High). To fix this, either winlirc must be started as admin or task manager (or orher tool) be used to set the process priority to Realtime.
Last edit: leg0 2013-12-17