Copyright © 2005-2019 MultiMedia Soft

How to synchronize the container application with the component

Previous pageReturn to chapter overviewNext page

Some method available inside Audio DJ Studio for .NET performs lengthy operations which, on a single-threaded environment, could block the user interface of the container application also for several seconds: just think about the time requested to perform the waveform analysis for a song longer than 5 minutes and you will perfectly understand that this operation couldn't be completed in less than one second.


In order to avoid this kind of blocks, the control performs lengthy operations inside secondary threads; the main side effect of this multithreaded approach is the fact that, when the method call returns, the requested operation could still be running in the background so requested data wouldn't be already available and any method call trying to access data would fail by returning an error code; for this reason it's very important that the container application synchronizes itself in some way with the component.


Audio DJ Studio for .NET supports two kinds of synchronization:


through Events
through Callback delegates