Audio Balance Setting

Hi

I am writing an app for people with variable hearing issues - I need to be able to change the the left-right volume of music being played (Apple Music, Spotify, etc) dynamically as the environment changes.

Being able to set the Accessibility options (Settings > General > Accessibility - Left-Right Audio Balance) from code would be perfect.

Does anyone know how I can programmatically set and adjust this left-right volume balance from my Swift app?


I've Googled this to death and can't find anything.


Andy

  • When listening with headphones I move the balance slider (setting/accessibility/audio & visual/balance slider) 95% to the right due to right side hearing loss. I want to automate the process in shortcuts, Apple’s iOS automation feature. I can’t find an option to do this while building a shortcut. Any ideas?

Add a Comment

Replies

I have the same with this problem. then I used the AudioToolbox library. and I found the following code "AudioBalanceFade" but I could not find how to describe it as the "UnsafePointer " parameter here. This code works but I could not find an example. maybe you can solve this part. and then I'm glad you told me how you did it. here Apple developer code Structure

Sorry for my english!