简体   繁体   中英

iOS: Change audio session properties without restarting audio session or AUGraph?

I run an AUGraph in an audio session. I wonder if it's possible to change audio session or audio unit properties in run time after starting the AUGraph . For example, if I switch hardware (eg, mics), can I change kAudioSessionProperty_CurrentHardwareSampleRate on the fly without restarting the session or AUGraph ?

The Apple "Audio Unit Host Guide for iOS" says "Most property values can be set only when an audio unit is uninitialized. ..." the next page says "An audio unit parameter is a user-adjustable setting that can change while an audio unit is producing audio". IIRC, they say to check the docs for each, but it's the fundamental difference between properties and parameters.

I don't know if you'd have any luck disabling the particular unit then trying the change.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM