Check if Audio Device is changed (4.22)

Hello, I am looking for a solution to check if the audio device has been changed in runtime so I can update my music that is playing in the background