Controlling volume with AVAudioEngine does not work properly
Originator: | recordtronic | ||
Number: | rdar://FB8910493 | Date Originated: | 11/20/2020 |
Status: | Closed | Resolved: | |
Product: | iOS | Product Version: | 14.2 |
Classification: | Crash | Reproducible: | Yes |
When using AVAudioEngine to play back audio: - Changing the mainMixer properties to control volume causes an exception (crash). This is literally how it's documented, so it's really broken. - Changing the volume property of an AVAudioPlayerNode has no effect on volume. - The only functioning way to control volume was to wire an AVAudioUnitEQ in and change the globalGain property, which is clearly not the intended approach. A sample project was supplied. UPDATE: my error, as I had connected the output of my eq node to the outputNode rather than the mainMixerNode.
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!
You can add a reduntant mixer node and use that.