Audio Volume increases by itself

I am using an AVAudioPlayer to play a "tick" sound once per second in a SwiftUI app.

When running the app on an iPhone 16 (18.2.1) the tick sounds increase in volume after a few seconds. This does not happen in the simulator nor on an iPhone SE 2020 (18.1.1).

Hello @ccapener, thank you for your post. Do you get the same results with just the relevant code in a small test project? If so, please share a link to your test project. That'll help us better understand what's going on. If you're not familiar with preparing a test project, take a look at Creating a test project.

Here is a link to a test project that exhibits the same behavior. It plays a 'tick' sound once a second for fifteen seconds. The tick sounds get louder during this period. Each fifteen seconds it simultaneously plays a 'beep' sound. The tick sounds the go back to their original volume before, once again, increasing in volume.

https://www.icloud.com/iclouddrive/09aUqD5LQctaBKSEO7qvjzCwQ#SoundTest

Audio Volume increases by itself
 
 
Q