I use a AVPlayerLooper to loop a video inside an AVPlayer. The video is actually an AVComposition merging two audio tracks and one video track.
I apply two audiomix input parameters on the composition, one for each audio track to manage their respective volume (using setVolume() method). Note also that one of the audio track has also a tap processor to apply some audio filters, using the dedicated property inside the audiomix input parameter.
Everything seems to work fine but I noticed an issue with the volume:
The first loop is fine and render the expected volume, but the volume of the next loops seems to be random, one loop being at the expected volume (let’s say 4.0 in setVolume()), the other being at default (1.0).
Note that if I mute and unmute the AVPlayer while playing in a loop where the volume is lower than expected, the volume comes back to its configured and expected value.
Note that exporting the same composition in a file (so out of any looper) with AVAssetExportSession is working great, the volume is always as expected.
Have you got any tips to help me with this issue?