From: Dennis S. <sy...@yo...> - 2004-09-15 11:59:42
|
On Wed, 2004-09-15 at 13:38 +0200, Burkhard Plaum wrote: > > In the case that you get anough audio samples for > > a high framerate, what is the use of asynchronous rendering? > > On weaker CPUs, one visualization plugin might slow down the whole > process (in the worst case, also the audio playback). Imagine a player, > which does something like: > > while(1) > { > get_next_samples(); > send_samples_to_soundcard(); > send_samples_to_libvisual(); > } > > If send_samples_to_libvisual() renders and displays everything > synchronously, the soundcard buffer might underrun, which won't sound > that good. > So at least at one point between the playback loop (which drives the > soundcard) and the visualization, things should be decoupled. > > If it's in the application, inside libvisual, or inside the plugin, > doesn't matter. In this setup, you use a audio callback in the libvisual pipeline which semi automaticly retrieves samples. Using that + have helper functions to run the complete libvisual pipeline in a thread and this issue is solved. > > We're creating this, through improving libvisual and introducing > > libvisual-display. > > The libvisual-display seems to be crucial. Keep me updated, when > there is something in CVS. Cool, watch the list, bits will coming the upcoming weeks. > Actually, lemuria does this for it's 256x256 texture: Copy the > framebuffer into a texture and into memory, exchange some colors > and copy it back into a second texture. > Because sometimes the foreground and background have > the same texture image, only the colors are swapped. Well, ok but here it's a small texture and for special purpose. > The funny thing is, that most people think, they are completely > different images :-) Hehehehe! Cheers, Dennis |