From: Jim Peters (jim_at_uazu.net)
Date: 2002-03-04 15:28:10
Jim Meissner wrote:
> I would guess this is still a problem (now a days) while watching
> Jim Peters program's slow screen updates.
On UNIX at least, if it is really necessary, you can have a high
priority process (or thread) handling the serial input and saving it
to disk, and a lower priority one doing the screen updates. Windows
surely can handle at least 57600baud, or else how do Windows users
connect to the internet reliably ?
The screen update in BWView is slow because it's drawing the screen
bit by bit as it calculates it. Try changing the brightness whilst it
is calculating, and you'll see the relative speed of screen update
versus calculation speed. There is a vast amount of calculation going
on in this program.
Also, it is fastest working with a 16-bit or 32-bit (4-byte aligned)
video mode (these will be 65536 colours or 16 million colours). Other
modes, such as 8-bit palette modes, or 3-byte RGB modes, are emulated
by SDL and so will be slower. If you're running in 8-bit mode, and
you have a choice, definitely try switching to 16-bit mode, or else
you lose a lot of the colour depth. If you don't have enough video
memory, you can use the -F option and run at something like 640x480x16
or 800x600x16, which gives you lower res, but better colours.
If you're really worried about update speed, I could push SDL a lot
harder -- after all, it was designed for writing games. However, I've
taken an approach that simplifies the coding a bit. If this is really
a problem, I can look at this further.
BWView was always intended as an analysis app. Another approach to
generating the analysis would definitely be needed for real-time use
and biofeedback (maybe IIR filters, or convolution the direct way (FIR
filters) using a smaller set of selected frequencies).
Jim
-- Jim Peters (_)/=\~/_(_) jim_at_uazu.net (_) /=\ ~/_ (_) Uazú (_) /=\ ~/_ (_) http:// B'ham, UK (_) ____ /=\ ____ ~/_ ____ (_) uazu.net
This archive was generated by hypermail 2.1.4 : 2002-07-27 12:28:39 BST