I think AudioStreamPlayer
only takes .wav
and .ogg
audio files. I'm not sure how well this will work with the file format iTunes uses (songs purchased from iTunes are aac by default) . Also, not all music will likely be saved to the users disk, since a lot of music is just streamed. You could try looking into this, but I have no idea if it will be helpful: MusicKit.
Default file location for iTunes:
- Windows:
C:\Users\<user>\Music\iTunes
- Mac:
/Users/<user>/Music/iTunes
- Linux: not sure
Maybe something from this post would be useful in actually reading system files.