How to retrieve iTunes preferences programmatically to find audio libraries?

后端 未结 3 1422
一生所求
一生所求 2021-02-06 17:56

I\'m creating an application on the Mac in Cocoa that plays audio. I think the best place for my application to search for audio files on a user\'s computer is to get the direct

3条回答
  •  野性不改
    2021-02-06 18:20

    Use the Scripting Bridge to talk to iTunes. You can ask iTunes about the user's library and every track in it; file tracks will freely tell you where they are in the file-system.

    Alternatively, embed Karelia Software's iMedia Browser framework, which will talk to iTunes for you.

    You probably should also be able to open audio files that the user drops on your app or assigns to it in Finder's Get Info and opens. Consider making your application document-based; alternatively, implement the right application delegate method and declare the right Info.plist properties.

提交回复
热议问题