|
From: Christian S. <sch...@so...> - 2004-09-04 10:11:01
|
Es geschah am Samstag, 4. September 2004 09:23 als St=E9phane LETZ schrieb: > I'm working on a multi-processors version of Jack. Would it be a way to > add multi-processors support to LS? > For example if LS would be able to run multiple audio engines driven by > multiple jack clients, then LS could be multi-processors ! > > How difficult would it be to have a multiple audio engine model in the > current version in order to test this idea? Each engine on each sampler channel is independent already. The thread /=20 process context solely comes from the audio output device (=3Ddriver) the=20 respective engine is connected to. So you would only have to modify the JAC= K=20 driver in LS a bit to be able to test it. But I wonder if it wouldn't be better to implement a driver independent=20 solution. Because copying the audio data to the final driver output buffer= =20 doesnt take much CPU time. Most of the CPU time is used for rendering the=20 data in each engine. So I would propose to implement a job dispatcher in th= e=20 AudioOutputDevice base class which distributes jobs for calling threads. So= =20 there would be a fix number of threads (which can be set by the user) which= =20 just poll the AudioOutputDevice base class for scheduled render jobs and th= e=20 driver thread itself asks the AudioOutputDevice class if all jobs are alrea= dy=20 done, if not it will also take a free job and poll again if all jobs are=20 done. Finally when all jobs are done, the driver thread will just copy the= =20 audio data to the driver output buffer. Anyway, no matter what you do, please wait a bit til committing something l= ike=20 that to CVS. I'm currently working to get things stable for the first=20 release. CU Christian |