|
|
Program gets out of Sync on 2 of my 3 computers
Last post Fri, Nov 23 2007 8:58 PM by Brian Peek. 9 replies.
-
Sun, May 27 2007 5:57 PM
|
|
-
Gohtar


- Joined on Sun, May 27 2007
- Posts 3
|
Program gets out of Sync on 2 of my 3 computers
The light sequencer program gets out of sync on 2 of my 3 computers. It gets about 10 seconds behind the music on my P4 3.2ghz and my P4 2.53ghz machines. But my Pentium M 900 mhz laptop works just fine. Do you have any ideas what might be causing the issue or some troubleshooting steps? On my 3.2 I tried setting the affinity to 1 cpu, which did nothing. I created my own version of your program which does things a lot different than in your's but it gets out of sync just as much as yours. Thanks
|
|
-
-
Gohtar


- Joined on Sun, May 27 2007
- Posts 3
|
Re: Program gets out of Sync on 2 of my 3 computers
Update: I commented out everything in the tick methods except for the code that counts and checks the ticks. I get the exact same thing on both of our apps, the ticks are still off by about 30 - 32 seconds.
I also tried the System.Threading.Timer with the same result.
Thanks
|
|
-
-
Brian Peek



- Joined on Sat, Mar 18 2006
- Niskayuna, NY
- Posts 1,127
|
Re: Program gets out of Sync on 2 of my 3 computers
Congratulations. You're the first person to notice. :) It is a known issue and I have a workaround, but it will require a new version. It's on my todo list with a trillion other things, but it will get done... Thanks, Brian
|
|
-
-
Gohtar


- Joined on Sun, May 27 2007
- Posts 3
|
Re: Program gets out of Sync on 2 of my 3 computers
I found a work around and put it in my version. Found on codeproject or a similar website someone using the Multimedia Timer, which is not part of .Net. They created an interop class which I just added to my project and it works perfectly.
|
|
-
-
-
dlfarl2


- Joined on Thu, Nov 22 2007
- Posts 1
|
Re: Program gets out of Sync on 2 of my 3 computers
I found a different work around. I lowered the interval to 25ms and set a datetime variable when the music starts. At each tick, I calculate the tickCount based upon the difference between the original datetime and the current datetime. Ticks are skipped every now and then, but unless the tick that is skipped is a change from on to off (or off to on), it doesn't cause any problems. This eliminates the drift over time issue.
|
|
-
-
Brian Peek



- Joined on Sat, Mar 18 2006
- Niskayuna, NY
- Posts 1,127
|
Re: Program gets out of Sync on 2 of my 3 computers
A higher time value will make it better (less for the computer to deal with), but still won't be perfect. I'm in the midst of version 2.0 of the app and article where this will be fixed properly, however it will require the creation of a new sequence to use the new timing values. Because the previous timing method was so inaccurate, forcing it into the new accurate timing method causes problems...
|
|
-
-
Valdier


- Joined on Mon, Jan 8 2007
- Posts 2
|
Re: Program gets out of Sync on 2 of my 3 computers
What are the odds that version 2 will be out before christmas this year? I just finished wiring everything and am fixing my project box tonight (didn't have the larger 7" so had to get a 6" and some creative sawing/drilling). Tested the sequencing on the partial sequence file you have in the example and all is working well... I do notice the phidget kits click constantly as they turn channels on and off... anyway that you know of to stop that?
|
|
-
-
Brian Peek



- Joined on Sat, Mar 18 2006
- Niskayuna, NY
- Posts 1,127
|
Re: Program gets out of Sync on 2 of my 3 computers
Odds are 100% it will be out before Christmas. As for the clilcking, that's the sound of the relays turning on and off. Short of building your own relay board out of solid-state relays, there is no way around it...
|
|
-
Page 1 of 1 (10 items)
|
|
|