コード例 #1
0
ファイル: MusicTags.cs プロジェクト: Gsangu/GsanPlayer
        private bool GetMP4Tags(int stream)
        {
            tags = Bass.BASS_ChannelGetTagsMP4(stream);
            if (tags != null)
            {
                for (int i = 0; i < tags.Length; i++)
                {
                    frameId = tags[i].Split('=')[0];
                    value   = tags[i].Split('=')[1];
                    switch (frameId)
                    {
                    case "title":
                        title = value;
                        break;

                    case "artist":
                        artist = value;
                        break;

                    case "album":
                        album = value;
                        break;

                    case "comment":
                        comment = value;
                        break;

                    case "year":
                        year = value;
                        break;

                    case "genre":
                        genre = value;
                        break;
                    }
                }
                return(true);
            }
            return(false);
        }