Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a problem.

My serial acquistion of data is losing few bytes when sound is played in the background.This happens in windows 7.

I use ReadFile to read the data and it reads data of current packet and also first bytes of next packet

so I assume few byte are lost from current packet.

any idea to prevent this ?
Posted
Comments
Sergey Alexandrovich Kryukov 28-Oct-12 10:43am    
Not believable; not enough information.

Obviously, it's impossible to give any answer due to lack of important information. Just some advice:

Check up your observations -- they can be wrong. For a human being, it's typical to mistakenly recognize a random coincidence as a correlation, a trait fixed by the evolution.

If, by a rare chance, there is a correlation, it should not do anything with the nature of "distracting action": it could be sound or something else. To analyze such possibility, find out if there is race condition in your code:
http://en.wikipedia.org/wiki/Race_condition

If you still need help, you need to reproduce this problem on a very simple but complete code sample (not your full code). It already can help you the solution. If not, post the sample, using "Improve question".

--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900