QB64 bug or exception? - Printable Version +- QB64 Phoenix Edition (https://staging.qb64phoenix.com) +-- Forum: QB64 Rising (https://staging.qb64phoenix.com/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://staging.qb64phoenix.com/forumdisplay.php?fid=3) +---- Forum: Help Me! (https://staging.qb64phoenix.com/forumdisplay.php?fid=10) +---- Thread: QB64 bug or exception? (/showthread.php?tid=944) Pages:
1
2
|
RE: QB64 bug or exception? - Pete - 10-04-2022 It's a racing issue. Think how fast the loop travels, several hundreds of times per second. Now multiply that sound call over and over... See what I'm getting at? Sound plays in the background and every time it is called again, before it finishes, that process keeps multiplying to some degree. Try this... Code: (Select All) FOR i = 1 TO 4000 Run it and note that it immediately exits, but the sound keeps playing a lot longer than 1/10th of a second. I actually tried what you came across with the _KEYDOWN example, and didn't include it so I wouldn't drive folks crazy. My best guess as to why INKEY$ doesn't work the same way is because it has some built in delay that negates the racing vulnerability we find in the _KEYDOWN statement. Pete RE: QB64 bug or exception? - James D Jarvis - 10-04-2022 It happens with printing "A" as well, not just the sound in that last example. check this out... I can get 3,4,5, even 6 keys to read on one pass through the loop.... but up and down arrows don't always seem to get noticed. ... on my laptop. BUT on my separate usb keyboard I can get all 4 arrows at the same time and the space key (both keyboards are talking to the same computer) Code: (Select All) Do RE: QB64 bug or exception? - Pete - 10-04-2022 Wow, this is getting really weird. So I plugged in my USB keyboard to my laptop. On my laptop I can get arrow right and arrow down with space bar all to register. On my USB keyboard, it won't register the same key presses! So now we also have a hardware inconsistency in the mix. Pete RE: QB64 bug or exception? - mnrvovrfc - 10-04-2022 I have at least one laptop which ignores keyboard and touchpad response on occasion. It's not too serious but it bothered me a few times. Especially on HP computers having that setting that cannot be turned off, the user forced to wait at least one second, after typing in a key to be able to click one of the touchpad buttons. But plug in a wireless USB mouse and then nothing else could be plugged in, such as an external USB disk because they could fight with each other... |