graphics and sound jerky
BlitzMax Forums/BlitzMax Programming/graphics and sound jerky
| ||
I'm a Blitz3D user that's recently bought BlitzMax. I tried to convert one of my old programs over to BlitzMax and found that the conversion has both the graphics and sound jerky while the BlitzBasic version is smooth. I have both versions on my site with graphics and audio. http://www.tomtoad.com/BlitzStuff/tiggerbb.zip http://www.tomtoad.com/BlitzStuff/tiggerbmx.zip [ETA] Strange, I just recompiled the program, unmodified, and now it runs just fine, although there's some tearing in the graphics. [/ETA] [ETA2] Well, it seems to be working ok now. I fixed the tearing by using HARDSYNC in the graphics. As far as the jerkiness, I have no clue what was causing it, but I seem to have no problems now.[/ETA2] Here is the code for the two diffeent versions. BlitzBasic version and BlitzMax version I've tried using FlushMem before the Flip, but it didn't make any difference. |
| ||
You need the flushmem anyway. I don't get any sound issues but, if it's crackling, then there's an ongoing bug HERE I changed the graphics to... graphics 640,480,32,0 which made things look better although they didn't seem bad to begin with. I do get a few jerky movements, after about 30-40 seconds, lasting a couple of seconds but I put that down to being connected to the internet. I'll signoff and check whether it still occurs. <edit> OK, the same jerky movement is there for about 2 seconds after 30 seconds but never seems to repeat (listened to Tigger bouncey, trouncey flounceying about 4 times). In fact, I get the same jerky movement at the same time in B3D. 2700+, 9800Pro, WinXP XP2 with 1G RAM. |
| ||
This is weird. I recompiled and executed the program again and again and still had problems, then all of a sudden, without any additional changes, everything runs fine. There must've been some CPU hogging task running in the background I guess. I did notice that I'll need to put a HidMouse in there :) |
| ||
The jerky problem can be caused by having your video driver set to ignore vsync. I think it happens even if you specify HARDSYNC. That could explain why it come and goes. Maybe. |