Beispiel #1
0
        public static CDInfo ReadCDInformationMCI(char driveLetter)
        {
            MCICDEngine mciCDEngine = new MCICDEngine();

            mciCDEngine.Open(driveLetter);
            mciCDEngine.Close();

            return(mciCDEngine.CDInfo);
        }
Beispiel #2
0
        public void Stop()
        {
            if (mciCDEngine != null)
            {
                mciCDEngine.Stop();
                mciCDEngine.Close();
                mciCDEngine = null;
            }

            if (currentChannel != null)
            {
                currentChannel.stop();

                if (currentSoundIndex == 0)
                {
                    channel1 = null;
                }
                else
                {
                    channel2 = null;
                }
            }

            // Bei einer CD den cdSound offen lassen, damit das wechseln zwischen subTracks schneller geht.
            if (cdSound == null)
            {
                if (currentSound != null)
                {
                    currentSound.release();
                    if (currentSoundIndex == 0)
                    {
                        sound1 = null;
                    }
                    else
                    {
                        sound2 = null;
                    }
                }
            }

            /* Aktuell keinen PlayCounter schreiben, das die ID3-Routinen Buggy sind!!
             * for (int i = PlayCountFileList.Count - 1; i >= 0;i-- )
             * {
             *   try
             *   {
             *       FileStream fs = File.OpenWrite(PlayCountFileList[i]);
             *       fs.Close();
             *
             *       SoundFileInformation sfi = SoundFileInformation.GetSoundFileInformation(PlayCountFileList[i]);
             *
             *       sfi.PlayCount++;
             *
             *       SoundFileInformation.WriteMP3Tags(sfi, Field.TrackPlayCount);
             *
             *       PlayCountFileList.RemoveAt(i);
             *   }
             *   catch
             *   {
             *
             *   }
             * }*/
        }