Sync sources

View: New views
3 Messages — Rating Filter:   Alert me  

Sync sources

by Yannick-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I was looking for information how to sync several sources and I came into the following posts from March 2004:
http://opensource.creative.com/pipermail/openal/2004-March/007357.html 
http://opensource.creative.com/pipermail/openal/2004-March/007360.html

That part was very interesting:

=============

> Question 1: What options if any are available if any to synchronize
> playback of samples?
...
> For example: can I play two samples at
> *exactly* the same time, can I then play a third sample at the exact
> time the first two samples loop? My initial impression is that this is
> not possible elegantly?

You can ask that two or more sources start playing at the same time by
using the alSourcePlayv call, handing in a vector to multiple sources. 
The individual implementation may or may not be able to actually start all
the sources at _exactly_ the same time, but it will be close.

The "playing a third sample at the exact time the first two samples loop"
case can't be handled in an elegant way at this time -- you're going to
end up with imprecise (not sample accurate) timing no matter what you do.

=============

Could someone tell me if this kind of issue can be solved now ?
I'm new to OpenAL and I would appreciate some hints if any.

Thanks.

--
ian


_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal

Re: Sync sources

by Jason Daly :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yannick wrote:
>
> Could someone tell me if this kind of issue can be solved now ?
> I'm new to OpenAL and I would appreciate some hints if any.
>


The OpenAL API hasn't changed much since that message was posted.  You
can still use alSourcePlayv() to start multiple sources at once, and you
still can't really start playing a third source at the exact time two
other sources loop.

If you tell us in a little more detail what you're trying to accomplish,
we might be able to give you better advice.

--"J"

_______________________________________________
Openal mailing list
Openal@...
http://opensource.creative.com/mailman/listinfo/openal

Re: Sync sources

by Eli1981 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey,

I'm looking for something very similar in my app.

Think of about 16 samples/loops that need to be in sync all the time. sample for each button that activate/disactivate the loop.

Ofcourse there would be a general bpm, and 4 or 16 beats count, so if u start a loop in the 2nd beat, it wont start playing it until the next "entry point" which is always the first beat of the next time.

What's the best way of accomplishing such thing in OpenAL?

Thanks ahead,

Eli
Jason Daly wrote:
Yannick wrote:
>
> Could someone tell me if this kind of issue can be solved now ?
> I'm new to OpenAL and I would appreciate some hints if any.
>


The OpenAL API hasn't changed much since that message was posted.  You
can still use alSourcePlayv() to start multiple sources at once, and you
still can't really start playing a third source at the exact time two
other sources loop.

If you tell us in a little more detail what you're trying to accomplish,
we might be able to give you better advice.

--"J"

_______________________________________________
Openal mailing list
Openal@opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal