Whenever I play a sound effect, I use:
alSourcei (sources [index], AL_BUFFER, 0); alSourcei (sources [index], AL_BUFFER, bufferID); alSourcef (sources [index], AL_PITCH, 1.0); alSourcef (sources [index], AL_GAIN, 1.0);
will significant optimization remove the AL_PITCH and AL_GAIN settings each time the sound effect is played? Obviously, since they are 1.0 every time I could just install it once when I initialize the sound. What are the default values AL_PITCH and AL_GAIN if they are not set?
" ", , , , OpenAL. , , .
alSourcei/alSourcef , , GetContextSuspended, / , switch , , , , , , TLB).
alSourcei
alSourcef
GetContextSuspended
switch
alSourcei / node , - malloc .
malloc
AL_GAIN AL_PITCH . , , , - . , , alSourcef .
AL_GAIN
AL_PITCH
alSourcef, , , , , , - , 1.0, , .... , , , ( ).