Hi,

2012/10/27 Devin Venable <[email protected]>:
> In the multi-track export feature I'm working on, I run into a snag.  The
> algorithm is essentially this:
>
> Get list of all enabled tracks
> for each track
>     mute all but current one
>     call ProjectRenderer::startProcessing
>
> restore original mute states

That should work.


> Since ProjectRender is a QThread, and since this code was not designed for
> concurrency, it's not possible to let the threads all execute
> asynchronously.

The rendering core itself is multi-threaded already so there's no
advantage in rendering tracks in parallel. Also I'm not sure whether
the project renderer code itself is thread-safe.

>  (Only one output track is rendered as the others are walked
> on by the first thread.)  My way around this is to place a wait() after
> start() in the class, or use a mutex to block concurrent execution. (I did
> some refactoring to allow this to work.)

I suggest using the methods used by ExportProjectDialog class. I
suggest a signal-slot-based solution here, i.e. connect
ProjectRenderer::finished() to an appropriate slot in your
multi-track-rendering-management-class and then everything should be
fine. The GUI thread can operate as usual and thus the GUI should not
be blocked.

Best regards

Toby

------------------------------------------------------------------------------
WINDOWS 8 is here. 
Millions of people.  Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/
_______________________________________________
LMMS-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmms-devel

Reply via email to