- Audio and mouse interaction
----boundary-LibPST-iamunique-1748704243_-_-
Content-type: text/plain
Folks,
I have given Helmut a first cut at GftAudio but have discovered a very
strange interaction between mouse and audio interaction. I hope someone
can lend a little insight into what might be going on.
What works:
Audio recording and playing to files. No gliches in sound recorded when
played back.
Display of waveform on screen in real time (see below).
What doesn't work:
While displaying realtime audio waveform if the mouse is used to drag
the window then either
(1) waveform continues correctly
or
(2) waveform is only displayed in left 1/4 of screen and right 3/4
shows value of waveform when left mouse was first clicked and held.
Frozen right part is not fixed but is shifted version of itself from one
repetition to the next (it jiggles on screen or looks like it is
shifting due to spinning spoke like effect). I am double buffering the
data and yet the number of shifted versions exceeds 2 (there are at
least 3 or 4 different shifts).
What I can say: Data coming from audio card is real. I zero the data
buffer before returning it to the card and yet the card returns it again
on the next cycle.
If I don't touch the mouse after starting the waveform plotting
everything works fine. If I drag ANY window then the bizzar behavior
occurs.
I am using Services.Action to poll when data is available and have an
ASSERT to test if data has been missed (buffer returned before last
buffer processed completely) but I am not getting a trap.
If I hold the mouse down then XYplane.Clear does not take effect until
the mouse is release but data is still displayed correctly in the 1/4
part of the windown (it just becomes overwritten until mouse is
released). This is due to the fact that Views.Update defers its action.
What is really worrisome is the data coming back from the card looks
real which seems impossible. Mouse handling is a pretty low-level
operating system function which has interrupts and so I could just
bearly believe that somehow the audio card and the mouse interrupts
might be stepping on each other but this seems highly unlikely since
many other people would have discovered this flaw.
Every buffer I get I clear and yet the same data keeps comming back to
me even when the audio input line is unplugged from the card. Where is
the data hiding? Where is it coming from, the card or some intermediate
buffer, Microsoft?
-Doug
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
----boundary-LibPST-iamunique-1748704243_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt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