[Openal] Channels
David Yazel
david at yazel.net
Fri Sep 12 11:33:51 PDT 2003
Ack that shoots my design... back to the drawing board. Looks like Sources are important resources to manage carefully.
Now about stereo not being hardware acellerated... what does that mean? I am concerned about cpu contention between rendering and sound. I would have assumed that stereo was a preferred format for most sounds, but I don't want to lose lots of FPS in software sound synthesis.
On another note I am having some trouble getting distance attenuation to work. I wonder if there are any newbie pitfalls which are common. I have set the reference distance, rolloff factor, min gain, max gain, listener position-orientation-velocity and source position-orientation-velocity. I move the sound from 0 to 30 units from the listener over time, but the sound does not decrease in volume. I was kinda pulling my hair out last night. If I get more info I will post it.
>-----Original Message-----
>From: Daniel PEACOCK [mailto:dpeacock at creativelabs.com]
>Sent: Friday, September 12, 2003 04:41 PM
>To: 'David Yazel'
>Cc: openal at opensource.creative.com
>Subject: Re: [Openal] Channels
>
>
>
>
>
>Hi David,
>
>> So the limit is on 1-sources (i.e. source names), 2-playing sources or 3-sources with buffers?
>
>There is a limit on the number of Sources that can be generated at once, because it is assumed that
>you may want to play all the sources simultaneously. Conversely there is no limit (or at least a
>very high limit) on the number of Buffers you can create.
>
>However, you are right that it is possible that in some implementations if you choose to use a
>source to playback a multi-channel buffer (currently only stereo supported) it could take up
>additional resources.
>
>If you know that you need to play back 2 stereo sources, you could generate 2 sources, attach stereo
>buffers to them, and then try and generate as many 3D buffers as you.
>
>FYI ... On the Windows openal32.dll "wrapper", using the "DirectSound3D" device to get hardware
>acceleration, hardware voices are only used for 3D mono sources. Stereo sources are played using
>software - so that actually don't take any voices from the hardware. They will still take 1 Source
>to play though.
>
>Dan
>
>
>
>
> "David Yazel"
> <david at yazel.net> To: <openal at opensource.creative.com>
> Sent by: cc:
> openal-admin at opensource.c Subject: Re: [Openal] Channels
> reative.com
>
>
> 09/12/03 04:33 AM
>
>
>
>
>
>
>So the limit is on 1-sources (i.e. source names), 2-playing sources or 3-sources with buffers? I
>would have assumed you could have as many sources as you would want, but should limit the number of
>those which play at one time. Also, is there a second limit in the number of hardware channels
>being used? So for example would 5 sources each playing a 2 channel stereo buffer use 10 total
>channels? I am not sure how I could enumerate the number of channels by "trying" it without knowing
>in advance what buffers each source would be using.
>
>David Yazel
>http://www.magicosm.net
>http://xith3d.dev.java.net/
>"No matter how complicated it looks, in the end it is just a bunch of triangles"
> ----- Original Message -----
> From: Garin Hiebert
> To: David Yazel ; openal at opensource.creative.com
> Sent: Friday, September 12, 2003 1:31 AM
> Subject: Re: [Openal] Channels
>
> There isn't a way to ask how many sources are going to be available. A
> common way to figure it out is to generate them one at a time when the
> program launches until it fails.
>
> It is quite common for a product to want to play more sounds than there
> are sources available, in which case you have to come up with some kind
> of voice management scheme to allocate the available resources. A
> common approach is to assign priorities to each sound when it is played
> and only really play it if there is a source available, if there is a
> lower-priority sound that can be bumped, or if there is an older
> same-priority sound which can be bumped.
>
> Garin
>
>
>
>
More information about the Openal
mailing list