的iTunes SDK:加载共享音乐加载、音乐、iTunes、SDK

2023-09-03 16:37:30 作者:假面紳士こ

我一直在.NET 3.5下搞乱与iTunes的SDK使用C#,但我还没有找到一种方法,从网络上的另一台计算机上加载一个共享音乐库。有谁知道我可以从iTunes SDK访问共享的音乐?如果这是不可能的,那么任何人都可以提出其他建议?

I've been messing with the iTunes SDK under .NET 3.5 with C#, but I have not found a way to load a shared music library from another computer on the network. Does anyone know how I can access shared music from the iTunes SDK? If this is not possible, then can anyone suggest alternatives?

推荐答案

下面是一些示例C#code以获得一个共享库。

Here's some sample C# code to get a Shared Library.

iTunesLib.IiTunes iTunesApp;
iTunesApp = new iTunesLib.iTunesAppClass();
iTunesLib.IITSourceCollection iSources = iTunesApp.Sources;
foreach (iTunesLib.IITSource iSource in iSources)
{
  if (iSource.Kind.Equals(iTunesLib.ITSourceKind.ITSourceKindSharedLibrary))
  {
    //Do AwesomeStuffHere!
  }
}