[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: /dev/dsp and X11 related? I think not!
Pierre Phaneuf wrote:
> Another thing that cropped up while doing an X11 version of Quadra:
> sound is now crappy in X11 mode, but is still fine in Svgalib mode. I
> should add that this is the same executable, and the sound.cpp file
> containing the sound code has no dependency whatsoever on any of the
> files changed to do the port.
> It sounds like its not the correct sample format, even though I have
> checks around the ioctl()s that request those and they report no
> Am I going crazy?
If you work with X11 all draw events are buffered (only drawn if needed).
This means that the complete CPU time could be given to X11, you could
also lock X11 if you send events faster than X11 could draw.
Call each frame or frequently XSync, you know after this point all drawing
events are handled.
And remember the time to do drawing is now doubled (game -> X11, X11
-> video card)
You could also increase the sound buffers.