ios - Create a crossfader with AvAudioPlayer -
how can create crossfader between 2 sound track avaudioplayer? i must use avaudiomix ? but... how should use? avaudioplayer not support using avaudiomix. try fade out playing directly setting playback volume getting timing right between 2 avaudioplayers difficult avaudioplayer known have high , unpredictable latency when starting play. one way accomplish use avplayer , avplayeritem , avcomposition . can setup composition overlay 2 audio files desired amount , setup avaudiomix fade out first , fade in second. method let have precise control on when audio files play relative 1 another.