We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › Minim: Multiple players, single buffer
Page Index Toggle Pages: 1
Minim: Multiple players, single buffer? (Read 808 times)
Minim: Multiple players, single buffer?
Jan 7th, 2009, 10:02pm
 
Hi Minim experts

Is it possible to load a sample into a buffer once and then have multiple players reading simultaneously from the buffer?

I can't find the right way to do this with Minim.

Thanks
~ce
Re: Minim: Multiple players, single buffer?
Reply #1 - Jan 8th, 2009, 1:41pm
 
I remember to have done something like this roughly by loading all needed samples into byte arrays and using arraycopy(…) to provide the players with the sample data. Not quite the elegant way, though. A better attempt at a solution would probably use something like ByteArrayInputStream to store the sample data.
Re: Minim: Multiple players, single buffer?
Reply #2 - Jan 10th, 2009, 2:27pm
 
Thanks brsma

Do you remember how you provided the player with the sample data? I can't find any way of setting the byte array manually.

~ce
Page Index Toggle Pages: 1