Source Relative [was Re: [Openal] How to vary the speed of sound]

Daniel PEACOCK dpeacock at creativelabs.com
Mon May 19 09:25:16 PDT 2008





Hi Chris,

I've fixed the "Generic Software" device problems with Source Relative so
it is spec. compliant.   Each Source with AL_SOURCE_RELATIVE mode set to
AL_TRUE will be processed as if the Listener was positioned at 0,0,0, with
an Orientation of 0,0,-1, 0,1,0 and Velocity 0,0,0.    This fix will be
rolled into the new binary release - which will be made available soon.

Dan

Notice
The information in this message is confidential and may be legally
privileged.  It is intended solely for the addressee.  Access to this
message by anyone else is unauthorized.  If you are not the intended
recipient,  any disclosure,  copying or distribution of the message,  or
any action taken by you in reliance on it,  is prohibited and may be
unlawful.  If you have received this message in error,  please delete it
and contact the sender immediately.  Thank you.




                                                                           
             Chris Robinson                                                
             <chris.kcat at gmail                                             
             .com>                                                      To 
             Sent by:                  openal at opensource.creative.com      
             openal-bounces at op                                          cc 
             ensource.creative                                             
             .com                                                  Subject 
                                       Re: [Openal] How to vary the speed  
                                       of sound                            
             05/18/2008 02:28                                              
             PM                                                            
                                                                           
                                                                           
                                                                           
                                                                           




On Sunday 18 May 2008 04:43:05 am wassim_belhadj at topnet.tn wrote:
> I would like to know how to vary the speed of sound using OpenAL.

The global speed of sound is defined by the attribute AL_SPEED_OF_SOUND:
alSpeedOfSound(343.3f);
speedofsound = alGetFloat(AL_SPEED_OF_SOUND);

Note that this only affects sounds playing with a doppler effect.

> For example, at a click on a button the sound is played with a  faster
> speed from the position where the action was made.

The speed of sound, however, doesn't sound like your problem here. This
makes
me think you either have a pitch set on the source, or velocities set on
the
source and/or listener (causing doppler to be applied). Or perhaps you
called
alBufferData with the incorrect frequency.

Note also that there are some issues if you're using AL_SOURCE_RELATIVE for

the sound. It seems some implementations don't make the velocity relative,
as
defined in the 1.1 spec (particularly, the old Windows version, and by
extension OpenAL Soft, and I think the SI). I can probably fix this for
OpenAL Soft, but I don't know about other implementations.
_______________________________________________
Openal mailing list
Openal at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal

ForwardSourceID:NT00060EBE



More information about the Openal mailing list