AL_CONE_OUTER_GAIN set to 0 triggers OpenAL error when it shouldn't

Originator:ewmailing
Number:rdar://8543491 Date Originated:2010-10-12
Status:Open Resolved:
Product:iOS Product Version:4.0
Classification:Other Bug Reproducible:Always
 
'SpaceRocksOpenALStreaming2_conebug.zip' was successfully uploaded

12-Oct-2010 04:17 PM Eric Wing:
Summary:
Setting AL_CONE_OUTER_GAIN to 0.0 triggers an OpenAL error, but it shouldn't. 0.0 is a legit value according to the OpenAL spec.

Steps to Reproduce:
Build and run the attached program in the Xcode 4.1 Simulator. (I haven't tried the device yet.) Watch the console for NSLog error messages particularly when the missiles fire. 

There are two parts to look at in the code:

In EWSoundSourceObject.m look for:


		// Apple BUG HERE: Gain at 0.0 fails when it shouldn't. New to iOS 4.1 simulator.
		coneOuterGain = 0.0;

and further down in the file look for:

		alSourcef(sourceID, AL_CONE_OUTER_GAIN, coneOuterGain);
		al_error = alGetError();
		if(AL_NO_ERROR != al_error)
		{
			NSLog(@"alSourcei AL_CONE_OUTER_GAIN: %s, %f", alGetString(al_error), coneOuterGain);
		}


Expected Results:
Shouldn't get an error.

Actual Results:
Get errors.

Regression:
This worked fine in 3.x and I think 4.0. I started noticing the problem in the 4.1 simulator.

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!