本文整理汇总了C#中PlaylistItem.toString方法的典型用法代码示例。如果您正苦于以下问题:C# PlaylistItem.toString方法的具体用法?C# PlaylistItem.toString怎么用?C# PlaylistItem.toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlaylistItem
的用法示例。
在下文中一共展示了PlaylistItem.toString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: next
void next()
{
if(playlistPlay && !shuffle){
currentSong = currentPlaylist.getNext(count);
Debug.Log (currentSong.toString());
count++;
}
}
示例2: searchForFiles
public void searchForFiles(string baseDirectory)
{
DirectoryInfo dir = new DirectoryInfo(baseDirectory);
DirectoryInfo[] directories = dir.GetDirectories();
foreach (DirectoryInfo d in directories) {
searchForFiles (d.FullName);
}
string fn = dir.FullName;
string[] musicFiles = Directory.GetFiles (@fn,"*.mp3");
foreach (string musicFile in musicFiles) {
//using (var mp3 = new Mp3File(musicFile)) {
Mp3ID3 tag = new Mp3ID3(musicFile);
//Id3Tag tag = mp3.GetTag (Id3TagFamily.FileStartTag);
if(tag != null){
/*
Debug.Log ("Title: " + tag.Title.Value);
Debug.Log ("Artist: " + tag.Artists.Value);
Debug.Log ("Album: " + tag.Album.Value);
Debug.Log("Genre: " + tag.Genre.Value);
*/
PlaylistItem newest = new PlaylistItem(musicFile,tag.Genre, tag.Artist, tag.Album, tag.Title);
Debug.Log (newest.toString());
songpool.Add(newest);
Stream stream = new FileStream("songpool/"+songpool.Count+".bin", FileMode.Create, FileAccess.Write, FileShare.None);
formatter.Serialize(stream, newest);
stream.Close();
}
//}
}
}