[Openal] Switched from OpenAL to OpenAL Soft.. lost sound effects. 2

bencelot bencelot at gmail.com
Tue Oct 14 06:19:24 PDT 2008


SOLVED!!!

Oh what a relief. You're exactly right.. it was the roll-off. I put it to 1
and now openal soft works perfectly on both Vista and XP. 

I guess the only question now is.. why did it seem to work properly before
with the old openal on XP.. very weird.

Anyway,
thanks.

Ben.







Daniel PEACOCK wrote:
> 
> 
> 
> 
> 
> Hi,
> 
> The value of 0.01 for the Roll-Off factor is going to make distance
> attenuation happen *very* slowly.  e.g. the sound will only drop by 6dB
> (e.g. to half volume) at a source-to-listener distance of 3232 units.
> 
> What happens if you set the Roll-Off Factor to 1.0?
> 
> It may be that the problem is actually on the XP machine.
> 
> Dan
> Creative Labs (UK) Ltd.
> 
> 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.
> 
> 
> 
> 
>                                                                            
>              bencelot                                                      
>              <bencelot at gmail.c                                             
>              om>                                                        To 
>              Sent by:                  openal at opensource.creative.com      
>              openal-bounces at op                                          cc 
>              ensource.creative                                             
>              .com                                                  Subject 
>                                        Re: [Openal] Switched from OpenAL   
>                                        to OpenAL Soft.. lost sound         
>              10/14/2008 12:03          effects. 2                          
>              PM                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
>                                                                            
> 
> 
> 
> 
> 
> All sounds are loaded only once, when the game starts up. Also, all sounds
> are mono.
> 
> 
> Here's how I'm setting it up:
> 
> 
>   alutInit(0, NULL);
> 
>   int error = alGetError();
>   if (error != AL_NO_ERROR)
>   {
>     cout << "INIT ERROR: " <<error << endl;
>   }
> 
>   alListener3f(AL_VELOCITY,0,0,0);
>   ALfloat oriValues[] = {0,0,-1 ,0,1,0};
>   alListenerfv(AL_ORIENTATION, oriValues);
> 
>   alDistanceModel(AL_INVERSE_DISTANCE);
> 
>   error = alGetError();
>   if (error != AL_NO_ERROR)
>   {
>     cout << "DISTANCE MODEL ERROR: " <<error << endl;
>   }
> 
> 
> And here's me creating my sources:
> 
>   //CREATING SOURCES
>   maxSounds = 32;
> 
>   for(int i = 0; i < maxSounds; i++) {
>     //LIFE SOUNDS
>     ALuint tempSource;
>     alGenSources(1, &tempSource);
>     alSourcei(tempSource, AL_BUFFER, step1);
>     alSourcei(tempSource, AL_SOURCE_RELATIVE, AL_TRUE);
>     alSource3f(tempSource, AL_VELOCITY, 0,0,0);
>     alSource3f(tempSource, AL_DIRECTION, 0,0,0);
>     alSourcef(tempSource, AL_MAX_DISTANCE, 1500);
>     alSourcef(tempSource, AL_ROLLOFF_FACTOR, 0.01);
>     alSourcef(tempSource, AL_REFERENCE_DISTANCE, 32);
> 
> 
>     sources.push_back(tempSource);
>   }
> 
> 
>   //Error checking
>   int error = alGetError();
>   if (error != AL_NO_ERROR)
>   {
>     cout << "LOADING SOURCES ERROR: " << error << endl;
>   }
> 
> 
> 
> 
> Now.. I don't get any errors at all when doing this. Remember, this all
> works perfectly (on XP) when I use the old openal32.dll. But as soon as I
> switch to the openal soft dll, it stops. I was under the impression that
> the
> code should all work the same?
> --
> View this message in context:
> http://www.nabble.com/Switched-from-OpenAL-to-OpenAL-Soft..-lost-sound-effects.-2-tp19965590p19971318.html
> 
> Sent from the OpenAL - User mailing list archive at Nabble.com.
> 
> _______________________________________________
> Openal mailing list
> Openal at opensource.creative.com
> http://opensource.creative.com/mailman/listinfo/openal
> 
> ForwardSourceID:NT00065FA2
> 
> _______________________________________________
> Openal mailing list
> Openal at opensource.creative.com
> http://opensource.creative.com/mailman/listinfo/openal
> 
> 

-- 
View this message in context: http://www.nabble.com/Switched-from-OpenAL-to-OpenAL-Soft..-lost-sound-effects.-2-tp19965590p19973388.html
Sent from the OpenAL - User mailing list archive at Nabble.com.



More information about the Openal mailing list