Fwd: Re: [Openal] Playing a sound twice at the same time.
Thilo Schulz
arny at ats.s.bawue.de
Thu Aug 30 19:32:54 EDT 2007
Hi,
I remember ioquake3 having exactly the same issue, mentioned in this post to
the OpenAL mailing list.
In the original implementation, as far as I recall, multiple sound sources
playing the same file would always be synchronized which is not the case in
ioquake3 at the moment.
I could look into making this happen, so, do we want to go back to the
original behaviour?
---------- Forwarded Message ----------
Betreff: Re: [Openal] Playing a sound twice at the same time.
Datum: Montag, 27. August 2007
Von: Chris Robinson <chris.kcat at gmail.com>
An: openal at opensource.creative.com
On Monday 27 August 2007 07:56:53 am Leben Ojanen wrote:
> Right now I want to be able to load a sound once, then play it more
> than once, at the same time.
>
> So far I have been unable to do this, probably due to my lack of
> understanding of how OpenAL works.
>
> At this time, I can load a sound, but trying to play it twice with my
> current implementation causes the first "playback" to just stop while
> the other starts.
>
> Could someone please point me in the right direction on how to fix this?
Sounds in OpenAL are split into two parts.. buffers (which hold the sound
data) and sources (which are the sound "controls", so to speak). A source is
what you use to play and stop a sound, and a buffer is where you store the
sound.
To be able to play the same sound multiple times at the same time, you need to
create a source for each individual playback, but attach them all to the same
buffer. Multiple sources can use the same buffer, so playing multiple sources
that use the same buffer will give the effect you want.
_______________________________________________
Openal mailing list
Openal at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal
-------------------------------------------------------
--
Thilo Schulz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://icculus.org/pipermail/quake3/attachments/20070831/70c60a08/attachment.pgp>
More information about the quake3
mailing list