[Openal] Channels

David Yazel david at yazel.net
Fri Sep 12 17:33:24 PDT 2003


Thanks for all your help, I have things working much better now.  

Three more questions:

1. I am trying to get the sound to fade to completely inaudible at a max_distance.  I will be of course optimizing by removing the sound, but I don't want it to sound like it shut off, but rather fades away.  So lets say the min gain is 0, the reference distance is 5, rolloff factor is 1, max volume is 1 and max distance is 30.  I am finding that the sound is still audible at 50 units.  Any trick to this?  I even tried setting min gain to -2.

2. I had hoped that sound moving from side to side with respect to the orientation of the listener would have the effect of moving the sound from the left to right speakers, giving the listener the ability to determine the driection of the sound by rotating their view.  The sound itself is not really directional, but emanating in all directions from the source.  Any ideas what this is?

3.  What is EAX and does this have anything to do with the above question?

Thanks!

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: kcharley at creativelabs.com 
  To: David Yazel 
  Cc: Daniel PEACOCK ; David Yazel ; openal at opensource.creative.com ; openal-admin at opensource.creative.com 
  Sent: Friday, September 12, 2003 4:05 PM
  Subject: Re: [Openal] Channels






  Hi David,

        The important info would be the values you set for reference
  distance, roll-off, etc...  Also if you are using stereo sounds they will
  NOT attenuate by distance or spatialized by position. The basic approach is
  to create mono sounds for sound effects and use stereo for music and/or
  ambient sounds that are static.

  Keith



  |---------+------------------------------------>
  |         |           "David Yazel"            |
  |         |           <david at yazel.net>        |
  |         |           Sent by:                 |
  |         |           openal-admin at opensource.c|
  |         |           reative.com              |
  |         |                                    |
  |         |                                    |
  |         |           09/12/2003 11:33 AM      |
  |         |                                    |
  |---------+------------------------------------>
    >------------------------------------------------------------------------------------------------------------------------------|
    |                                                                                                                              |
    |       To:       "Daniel PEACOCK" <dpeacock at creativelabs.com>, "David Yazel" <david at yazel.net>                                |
    |       cc:       openal at opensource.creative.com                                                                               |
    |       Subject:  Re:  [Openal] Channels                                                                                       |
    >------------------------------------------------------------------------------------------------------------------------------|





  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
  >
  >
  >
  >


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


  _______________________________________________
  openal mailing list
  openal at opensource.creative.com
  http://opensource.creative.com/mailman/listinfo/openal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://opensource.creative.com/pipermail/openal/attachments/20030912/e9ce3c76/attachment-0001.html


More information about the Openal mailing list