コード例 #1
0
        private void PlaySong(Track t)
        {
            if (stream != -1)
            {
                Bass.BASS_ChannelStop(stream);
                Bass.BASS_StreamFree(stream);
            }
            stream = Bass.BASS_StreamCreateFile(t.FilePath, 0, 0, BASSFlag.BASS_DEFAULT);

            // TAG_INFO tag = BassTags.BASS_TAG_GetFromFile(t.FullPath);

            Bass.BASS_ChannelPlay(stream, true);
            string[] wlm = { t.ToString() };
            WLMStatus.SetNPM(WLMStatus.NPMType.Music, wlm, "{0}", true);
            curPlaying = t.ToString();
            tmrSongPlayed.Enabled = true;
        }
コード例 #2
0
 void m_tl_TrackUpdated(Track t)
 {
     if (InvokeRequired) Invoke(new TrackDelegate(m_tl_TrackUpdated), new object[] { t });
     int itemCount = picList.Height / Font.Height;
     int ind = m_tl.IndexOf(t);
     if (ind >= vs.Value && ind <= vs.Value + itemCount)
     {
         UpdateScrollbar();
         picList.Invalidate();
     }
 }
コード例 #3
0
 void playlist1_TrackSelected(Track t)
 {
     PlaySong(t);
 }