macosx: Fix freezing on play caused by searching for other music applications
I consistently get freezes when pressing play or when reopening the window, especially when there are a lot of playlist items in the playlist.
Profiling VLC it shows that this is caused by calls to SBApplication
's applicationWithBundleIdentifier:
to look for Apple Music, Spotify and iTunes in order to stop their playback.
These calls are individually very slow, and calling them each time on the main thread causes the freeze.
A much better and faster way of doing this is to look for these apps only once asynchronously, store the pointer, and access when needed.
Signed-off-by: Claudio Cambra developer@claudiocambra.com