AudioSessionSetActive errors unavoidable/disconcerting
| Originator: | ewmailing | ||
| Number: | rdar://10081811 | Date Originated: | 2011-09-06 |
| Status: | Open | Resolved: | |
| Product: | iPhone SDK | Product Version: | 4.3 |
| Classification: | Other Bug | Reproducible: | Always |
06-Sep-2011 04:15 PM Eric Wing: 'OpenALSuspendResume.zip' was successfully uploaded 06-Sep-2011 04:15 PM Eric Wing: Summary: Calling AudioSessionSetActive with a value that is already set (e.g. setting to true when already active, false when not active), always produces an error condition from the function. Because it is impossible to find out the current state because there is no AudioSessionGetActive (see Bug 9573841), it is impossible to tell dynamically what the current state. Furthermore, the documentation isn't clear enough when the audio session is set active or inactive for you automatically and when you must set it, so for safety, I must always explicitly set it. However, this seems to guarantee an error condition and I am afraid if this has performance implications or state corruption. Steps to Reproduce: Attached is a simple case (used for a different bug 10081775). Basically, I am testing app suspend/resume. If I suspend enough times, I seem to be able to eventually trip up errors on the AudioSessionSetActive. I am unclear why I get it sometimes but not all times. Just build/run and keep suspending/resuming. The debug messages when an error are: Error setting audio session active to 1! '!ini' Error setting audio session active to 0! '!ini' Expected Results: Not sure. Would be more reassured if setting the AudioSessionActive to the same value did not return an error. Actual Results: Returns an error. Regression: All versions of iOS. 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!