From: Patrick Shirkey <pshirkey@bo...> - 2001-05-05 05:00:38
I have just uploaded to sourcforge the first patch to sample-display.c
which allows the sample to automatically scroll while playing.
There are a few bugs but none of them are dangerous (as far as I can
1) The syncing of the scroll works best at the default window setting.
If the window is too big the scroll gets behind the sound. If the sample
is magnified too far it is very jerky.
2) The playmarker is not released until Esc is pressed. It does not
realise that the music has stopped playing.
3) The patch does not account for the selected area yet. I will keep
working on it but I think that one may take me a while so I'm hoping
other people may have the time.
The effected function is sample_display_draw_main. It turns out that is
is a very small piece of code. It just shows how well thought out the
basic design of sweep is.
Importing Korean Computer Hardware to New Zealand.
Http://www.boosthardware.com for latest stock and prices.
From: Juhana Sadeharju <kouhia@ni...> - 2001-05-07 16:10:26
>From: Patrick Shirkey <pshirkey@...>
>If the window is too big the scroll gets behind the sound.
[ ... ]
>It turns out that is
>is a very small piece of code. It just shows how well thought out the
>basic design of sweep is.
This is merely a repeat, but I'm convinced my suggestion is better
way to do it.
My suggestion is to use the shared memory variable to tell the current
play position, and to compute the view by keeping the play position
at the center of view. The view should not be computed by incrementing.
The following computations would be done:
1. compute new view with respect to the play position
2. adjust the view based on restrictions (for example, end of waveform
never comes to center of view but stays at right edge or beyond)
3. compute play marker with respect to the adjusted view
4. update the view and the play marker
There is more, but if you could first implement my suggestions and test
how it works, then I will check further. The above computations should
be as easy as the current computations, and it should fit to your design.
Were there any problems in setting the shared memory variable for
the play position? I may check the code myself then -- but I cannot
compile and run it because I don't have X due Linux seems to not support
the graphics chip I have (Intel 815). Anyway, Debian installation failed
badly too (not my fault!).