> I wrote something similar for Blender. It's an audio analysis tool
> that graphs the contents of an entire wav file in a little window.
> Granted making something generic enough to work with all media streams
> would be a lot more challenging. Either way, I think the word
> excessive does apply. Pixels on a canvas to reflect a waveform does
> not really need the power of OpenGL.

I wouldn't be too hasty about this. Remember that overall latency (ie
what the user cares about) includes the response time of the user
interface. If you're dragging the waveform then you need to see it
respond to what you're doing as quickly as possible for it to be a
useful control method. We're essentially limited here by the refresh
rate of your screen at 10-15ms latency. But we want to be as close to
that as possible.

The whole waveform has to be repainted every frame while using as
little cpu time as possible so that we can give audio priority and
keep latency low. Although a pure rough numbers calculation would
imply that we could paint that number of pixels 60x a second without
hardware accelleration reasonably easily you have to remember that
user interface toolkits are not usually optimized for this kind of
every frame drawing and there are usually additional buffering and
compositing stages along the way. Using GL guarantees that we're
always drawing pretty much as efficiently as the hardware allows.

I agree that many modern machines can probably get by without it but
for most people I suspect there will be a cost in latency.

Having said that I have no numbers to back this up so if people want
to try things I'm happy to evaluate them on their merits. I just want
to make a point that there's more to this than meets the eye.

Adam

PS Here are some rough numbers,

100x1000 = 100,000 pixels
60fps => 6,000,000 px/s

So for a 1Ghz processor:

Ops/px      Load
10              0.06
100            0.6
1000          6.0

So you can't screw around too much with this texture if you want to do
it at 60fps (bearing in mind that you have to generate the texture
too).

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel

Reply via email to