Click here to Skip to main content
Click here to Skip to main content
 
Add your own
alternative version

BSEtunes

, 24 Apr 2010 CPOL
BSEtunes is a MySQL based, full manageable, networkable single or multiuser jukebox application
BSE.Platten.zip
BSE.Platten
BSE.Platten.vssscc
mssccprj.scc
vssver2.scc
BSE.CoverFlow.WPFLib
BSE.CoverFlow.WPFLib.csproj.user
BSE.CoverFlow.WPFLib.csproj.vspscc
mssccprj.scc
vssver2.scc
Images
close.png
exit.png
next.png
next_disabled.png
Note.jpg
pause.png
PlayButton.png
previous.png
previous_disabled.png
stop.png
vssver2.scc
Properties
Settings.settings
vssver2.scc
Resources
vssver2.scc
BSE.Platten.Admin
BSE.Platten.Admin.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
Settings.settings
vssver2.scc
Resources
Album16.gif
BSEadmin.ico
cdimport.png
cdrip.png
cd_hoeren.png
clearsearch.png
DataContainer_MoveFirsHS.png
DataContainer_MoveLastHS.png
DataContainer_MoveNextHS.png
DataContainer_MovePreviousHS.png
DataContainer_NewRecordHS.png
diskinfo.png
DRIVEDSC.png
DRIVENET.png
Edit_UndoHS.png
exportimage.png
findfile.png
FindHS.png
freedb.png
Genre16.png
Image.png
InsertPictureHS.png
Interpret16.png
OptionsHS.png
PieChart3DHS.png
PieChartHS.png
ProtectFormHS.png
RefreshDocViewHS.png
saveHS.png
search.png
song.png
system.png
tagger.png
tools_16.png
vssver2.scc
BSE.Platten.Admin.WinApp
BSE.Platten.Admin.WinApp.csproj.user
BSE.Platten.Admin.WinApp.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
Settings.settings
vssver2.scc
Resources
BSEadmin.ico
vssver2.scc
BSE.Platten.Audio
bse.ico
BSE.Platten.Audio.csproj.vspscc
mssccprj.scc
vssver2.scc
Options
vssver2.scc
Player
vssver2.scc
Properties
vssver2.scc
Resources
FillDownHS.png
FillLeftHS.png
Folder256.png
FolderFind.png
FolderOpen256.png
GoLtrHS.png
MoveNext.png
MovePrevious.png
OptionsHS.png
PauseHS.png
PlayHS.png
Slider.gif
Start.png
StopHS.png
vssver2.scc
WinControls
vssver2.scc
WMFSDK
vssver2.scc
BSE.Platten.BO
BSE.Platten.BO.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
vssver2.scc
BSE.Platten.Common
BSE.Platten.Common.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
vssver2.scc
Resources
BSEsplash.png
DRIVEDSC.png
DRIVENET.png
Network.png
splash.png
vssver2.scc
BSE.Platten.Covers
BSE.Platten.Covers.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
Settings.settings
vssver2.scc
BSE.Platten.FreeDb
BSE.Platten.FreeDb.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
vssver2.scc
Resources
OpenCD.png
vssver2.scc
BSE.Platten.Ripper
BSE.Platten.Ripper.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
vssver2.scc
Resources
OpenCD.png
OptionsHS.png
vssver2.scc
BSE.Platten.Statistik
BSE.Platten.Statistik.csproj.vspscc
mssccprj.scc
vssver2.scc
Properties
vssver2.scc
BSE.Platten.Tunes
BSE.Platten.Tunes.csproj.user
BSE.Platten.Tunes.csproj.vspscc
mssccprj.scc
vssver2.scc
Filters
vssver2.scc
Properties
Settings.settings
vssver2.scc
Resources
About.png
Album16.gif
AudioCD.png
AudioFile.png
AutoList.png
broadcast.png
BSE.png
BSEAbout.png
BSEsplash.png
BSEtunes.ico
BSE_16.png
cd_hoeren.png
coverflow.png
DataContainer_MoveNextHS.png
delete.gif
diskinfo.png
Filter2HS.png
FindHS.png
Folder256.png
FolderOpen256.png
Genre16.gif
Interpret16.gif
keinBild.gif
NewPlaylist16.gif
OptionsHS.png
PauseHS.png
RefreshDocViewHS.png
Removabledrive.png
saveHS.png
search.png
shuffle.png
Shuffle_icon.png
song.png
splash1.png
StopHS.png
TaskHS.png
TrackInfo.gif
vssver2.scc
wiedergabe16.gif
BSEadminSetup
BSEadminSetup.vdproj
BSEadminSetup.vdproj.vspscc
mssccprj.scc
vssver2.scc
Debug
Release
BSEtunesSetup
BSEtunesSetup.vdproj
BSEtunesSetup.vdproj.vspscc
mssccprj.scc
vssver2.scc
Debug
Release
dll
BSE.CDDrives.DLL
BSE.Charts.DLL
BSE.Configuration.DLL
BSE.RemovableDrives.DLL
BSE.Shell.DLL
BSE.Windows.Forms.DLL
Lame
lame_enc.dll
vssver2.scc
lame-3.97
BSE.Platten_en.zip
BSE.CoverFlow.WPFLib.csproj.user
close.png
exit.png
next.png
next_disabled.png
Note.jpg
pause.png
PlayButton.png
previous.png
previous_disabled.png
stop.png
vssver2.scc
Settings.settings
vssver2.scc
vssver2.scc
BSE.Platten.Admin.csproj.user
Settings.settings
vssver2.scc
Album16.gif
BSEadmin.ico
cdimport.png
cdrip.png
cd_hoeren.png
clearsearch.png
DataContainer_MoveFirsHS.png
DataContainer_MoveLastHS.png
DataContainer_MoveNextHS.png
DataContainer_MovePreviousHS.png
DataContainer_NewRecordHS.png
diskinfo.png
DRIVEDSC.png
DRIVENET.png
Edit_UndoHS.png
exportimage.png
findfile.png
FindHS.png
freedb.png
Genre16.png
Image.png
InsertPictureHS.png
Interpret16.png
OptionsHS.png
PieChart3DHS.png
PieChartHS.png
ProtectFormHS.png
RefreshDocViewHS.png
saveHS.png
search.png
song.png
system.png
tagger.png
tools_16.png
vssver2.scc
BSE.Platten.Admin.WinApp.csproj.user
Settings.settings
vssver2.scc
BSEadmin.ico
vssver2.scc
bse.ico
BSE.Platten.Audio.csproj.user
vssver2.scc
vssver2.scc
vssver2.scc
FillDownHS.png
FillLeftHS.png
Folder256.png
FolderFind.png
FolderOpen256.png
GoLtrHS.png
MoveNext.png
MovePrevious.png
OptionsHS.png
PauseHS.png
PlayHS.png
Slider.gif
Start.png
StopHS.png
vssver2.scc
vssver2.scc
vssver2.scc
BSE.Platten.BO.csproj.user
vssver2.scc
BSE.Platten.Common.csproj.user
vssver2.scc
BSEsplash.png
DRIVEDSC.png
DRIVENET.png
Network.png
splash.png
vssver2.scc
BSE.Platten.Covers.csproj.user
Settings.settings
vssver2.scc
BSE.Platten.FreeDb.csproj.user
vssver2.scc
OpenCD.png
vssver2.scc
AudioWriter
vssver2.scc
BSE.Platten.Ripper.csproj.user
Lame
vssver2.scc
vssver2.scc
OpenCD.png
OptionsHS.png
vssver2.scc
BSE.Platten.Statistik.csproj.user
vssver2.scc
BSE.Platten.Tunes.csproj.user
vssver2.scc
Settings.settings
vssver2.scc
About.png
Album16.gif
AudioCD.png
AudioFile.png
AutoList.png
broadcast.png
BSE.png
BSEAbout.png
BSEsplash.png
BSEtunes.ico
BSE_16.png
cd_hoeren.png
coverflow.png
DataContainer_MoveNextHS.png
delete.gif
diskinfo.png
Filter2HS.png
FindHS.png
Folder256.png
FolderOpen256.png
Genre16.gif
Interpret16.gif
keinBild.gif
NewPlaylist16.gif
OptionsHS.png
PauseHS.png
RefreshDocViewHS.png
Removabledrive.png
saveHS.png
search.png
shuffle.png
Shuffle_icon.png
song.png
splash1.png
StopHS.png
TaskHS.png
TrackInfo.gif
vssver2.scc
wiedergabe16.gif
BSEadminSetup.vdproj
BSEtunesSetup.vdproj
BSE.CDDrives.DLL
BSE.Charts.DLL
BSE.Configuration.DLL
BSE.RemovableDrives.DLL
BSE.Shell.DLL
BSE.ThreadedShell.DLL
BSE.Windows.Forms.DLL
lame_enc.dll
MySQL.chm.zip
MySQL.chm
MySqlCreateDataBase5x.sql.zip
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.IO;
using System.Diagnostics;

using BSE.CDDrives;
using BSE.Platten.BO;
using BSE.Platten.Common;
using BSE.Configuration;
using System.Collections.ObjectModel;
using System.Globalization;
using BSE.Platten.Ripper.Properties;


namespace BSE.Platten.Ripper
{
    public partial class RipTracks : BaseForm
    {

        #region EventsPublic

        public event EventHandler<TrackRippingEventArgs> TrackRipped;
        public event System.EventHandler RippingComplete;

        #endregion

        #region Delegates

        private delegate void ReadProcessHandler(ReadProgressEventArgs readProgressEventArgs);
        private delegate void WriteStatusHandler(CTrack track);
        private delegate void WindowCloseHandler();

        #endregion

        #region FieldsPrivate

        private CConfiguration m_configuration;
        private Collection<CTrack> m_trackCollection;
        private uint m_iTotalSize;
        private uint m_iBytesRead;
        private uint m_iBytes2Read;
        private uint m_iTotalBytesRead;
        private string m_strOutputDirectory;
        private CDDrive m_cdDrive;
        private int m_iTrackIndex;
        private CTrackRipper m_trackRipper;
        
        #endregion

        #region Properties

        public string OutputDirectory
        {
            get { return this.m_strOutputDirectory; }
            set
            {
                if (value != null)
                {
                    if (value != this.m_strOutputDirectory)
                    {
                        this.m_strOutputDirectory = value;
                    }
                }
            }
        }

        public CDDrive CDDrive
        {
            get { return this.m_cdDrive; }
            set
            {
                if (value != this.m_cdDrive)
                {
                    this.m_cdDrive = value;
                }
            }
        }

        #endregion

        #region MethodsPublic

        public RipTracks()
        {
            InitializeComponent();
            this.m_lblTotalTrackPercentValue.Text = string.Format(CultureInfo.InvariantCulture,"0 %");
            this.m_lblTrackPercentValue.Text = string.Format(CultureInfo.InvariantCulture,"0 %");
        }

        public RipTracks(CConfiguration configuration, Collection<CTrack> trackCollection)
            : this()
		{
            this.m_configuration = configuration;
            this.m_trackCollection = trackCollection;
            this.m_iTotalSize = GetTotalTracksSize(trackCollection);
		}

        #endregion

        #region MethodsProtected
        #endregion

        #region MethodsPrivate

        private void RipThisTrack(int iIndexTrackToRip, System.IO.FileMode fileMode)
        {
            this.m_trackRipper = null;
            this.m_trackRipper = new CTrackRipper();
            this.m_trackRipper.ReadCDProgess -= new BSE.CDDrives.CdReadProgressEventHandler(this.CdReadProgress);
            this.m_trackRipper.ReadCDProgess += new BSE.CDDrives.CdReadProgressEventHandler(this.CdReadProgress);
            this.m_trackRipper.TrackRippingCanceled -= new EventHandler<TrackRippingEventArgs>(this.TrackRippingCanceled);
            this.m_trackRipper.TrackRippingCanceled += new EventHandler<TrackRippingEventArgs>(this.TrackRippingCanceled);
            this.m_trackRipper.TrackExists -= new EventHandler<TrackRippingEventArgs>(this.TrackExists);
            this.m_trackRipper.TrackExists += new EventHandler<TrackRippingEventArgs>(this.TrackExists);
            this.m_trackRipper.TrackRipping -= new EventHandler<TrackRippingEventArgs>(this.TrackRipping);
            this.m_trackRipper.TrackRipping += new EventHandler<TrackRippingEventArgs>(this.TrackRipping);
            this.m_trackRipper.TrackRipped -= new EventHandler<TrackRippingEventArgs>(this.RipperTrackRipped);
            this.m_trackRipper.TrackRipped += new EventHandler<TrackRippingEventArgs>(this.RipperTrackRipped);
            this.m_trackRipper.StartRipping(
                this,
                this.m_cdDrive,
                this.m_trackCollection[iIndexTrackToRip],
                fileMode,
                this.m_iTotalSize,
                this.m_configuration);
        }

        private void CdReadProgress(object sender, ReadProgressEventArgs ea)
        {
            if (this.IsHandleCreated == true)
            {
                this.Invoke(new ReadProcessHandler(ReadProcess), ea);
            }
        }

        private void TrackExists(object sender, TrackRippingEventArgs e)
        {
            string strException = String.Format(CultureInfo.CurrentUICulture,Resources.IDS_FileToRipExistsException, e.Track.FileFullName);
            DialogResult dialogResult = GlobalizedMessageBox.Show(
                this,
                strException,
                MessageBoxButtons.YesNo,
                MessageBoxIcon.Warning);

            if (dialogResult == DialogResult.Yes)
            {
                RipThisTrack(this.m_iTrackIndex, System.IO.FileMode.Create);
            }
            else
            {
                if (this.IsHandleCreated == true)
                {
                    this.Invoke(new WindowCloseHandler(WindowCloseEvent));
                }
            }
        }

        private void TrackRippingCanceled(object sender, TrackRippingEventArgs e)
        {
            GlobalizedMessageBox.Show(this,Resources.IDS_RippingAbortException, MessageBoxButtons.OK, MessageBoxIcon.Information);
            if (e.Track != null)
            {
                System.IO.FileInfo fileInfo = new System.IO.FileInfo(e.Track.FileFullName);
                if (fileInfo.Exists)
                {
                    fileInfo.Delete();
                }
            }
            if (this.IsHandleCreated == true)
            {
                this.Invoke(new WindowCloseHandler(WindowCloseEvent));
            }
        }

        private void TrackRipping(object sender, TrackRippingEventArgs e)
        {
            if (this.IsHandleCreated == true)
            {
                this.Invoke(new WriteStatusHandler(WriteStatusText), e.Track);
            }
        }

        private void RipperTrackRipped(object sender, TrackRippingEventArgs e)
        {
            //das Ende des Rip- Vorgangs wird an das aufrufenden Formular zur�ck gegeben
            if (this.TrackRipped != null)
            {
                this.TrackRipped(sender, new TrackRippingEventArgs(e.Track));
            }
            if (MoveNext() == true)
            {
                RipThisTrack(this.m_iTrackIndex, System.IO.FileMode.CreateNew);
            }
            else
            {
                if (this.IsHandleCreated == true)
                {
                    this.Invoke(new WindowCloseHandler(WindowCloseEvent));
                }
            }
        }

        private void WindowCloseEvent()
        {
            this.Close();
        }

        private static uint GetTotalTracksSize(Collection<CTrack> trackCollection)
        {
            uint iTotalTracksSize = 0;
            foreach (CTrack track in trackCollection)
            {
                iTotalTracksSize += track.TrackSize;
            }
            return iTotalTracksSize;
        }

        private void m_btnCancel_Click(object sender, EventArgs e)
        {
            if (this.m_trackRipper != null)
            {
                this.m_trackRipper.CancelRipping();
            }
        }

        private void CRipTracks_Load(object sender, EventArgs e)
        {
            this.RipThisTrack(this.m_iTrackIndex, System.IO.FileMode.CreateNew);
        }

        private void CRipTracks_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (this.m_trackRipper != null)
            {
                System.Threading.Thread threadTrackRipper =
                    this.m_trackRipper.Thread();
                if (threadTrackRipper != null && threadTrackRipper.IsAlive)
                {
                    this.m_trackRipper.CancelRipping();
                }
            }
            if (this.RippingComplete != null)
            {
                this.RippingComplete(this, e);
            }
        }

        private void ReadProcess(ReadProgressEventArgs readProgressEventArgs)
        {
            if (readProgressEventArgs.BytesRead == 0)
            {
                this.m_iBytes2Read = 0;
                this.m_iBytes2Read = readProgressEventArgs.Bytes2Read;
            }
            if (this.m_iBytes2Read == readProgressEventArgs.BytesRead)
            {
                this.m_iTotalBytesRead += readProgressEventArgs.BytesRead;
            }

            this.m_iBytesRead = this.m_iTotalBytesRead + readProgressEventArgs.BytesRead;

            ulong lPercentTotal = ((ulong)this.m_iBytesRead * 100) / this.m_iTotalSize;
            if (lPercentTotal <= 100)
            {
                this.m_pgTotalTime.Value = (int)lPercentTotal;
                this.m_lblTotalTrackPercentValue.Text = (double)lPercentTotal + " %";
            }

            ulong lPercent = ((ulong)readProgressEventArgs.BytesRead * 100) / readProgressEventArgs.Bytes2Read;
            this.m_pgTime.Value = (int)lPercent;
            this.m_lblTrackPercentValue.Text = (double)lPercent + " %";
        }

        private void WriteStatusText(CTrack track)
        {
            if (this.m_iTrackIndex == 0)
            {
                //Index 0, die erste Zeile wird geschrieben
                this.m_txtStatus.AppendText(string.Format(
                    CultureInfo.CurrentUICulture,
                    Resources.IDS_RippingTrackInformation,
                    track.Title,
                    track.FileFullName));
            }
            else
            {
                //Index > 0, die Zeilen werden angeh�ngt
                this.m_txtStatus.AppendText(
                    Environment.NewLine + string.Format(
                    CultureInfo.CurrentUICulture,
                    Resources.IDS_RippingTrackInformation,
                    track.Title,
                    track.FileFullName));
            }
        }

        public bool MoveNext()
        {
            if (this.m_trackCollection == null || this.m_trackCollection.Count == 0)
            {
                return false;
            }

            if (this.m_iTrackIndex < this.m_trackCollection.Count - 1)
            {
                this.m_iTrackIndex++;
                return true;
            }
            else
            {
                return false;
            }
        }

        #endregion

        #region internal class CTrackRipper

        internal class CTrackRipper
        {
            #region EventsPublic

            public event BSE.CDDrives.CdReadProgressEventHandler ReadCDProgess;
            public event EventHandler<TrackRippingEventArgs> TrackRipping;
            public event EventHandler<TrackRippingEventArgs> TrackRipped;
            public event EventHandler<TrackRippingEventArgs> TrackRippingCanceled;
            public event EventHandler<TrackRippingEventArgs> TrackExists;

            #endregion

            #region FieldsPrivate

            private BSE.CDDrives.CDDrive m_cdDrive;
            private BSE.Platten.BO.CTrack m_track;
            private Thread m_ripThread;
            private BSE.Configuration.CConfiguration m_configuration;
            private System.IO.FileMode m_fileMode = FileMode.CreateNew;
            private AudioWriter m_audioWriter;
            private System.Timers.Timer m_timer;
            private bool m_bCancelRipping;
            private uint m_iTotalTracksSize;
            private IWin32Window m_owner;

            #endregion

            #region MethodsPublic

            public void StartRipping(
                IWin32Window owner,
                CDDrive cdDrive,
                CTrack track,
                FileMode fileMode,
                uint iTotalTracksSize,
                CConfiguration configuration)
            {
                this.m_owner = owner;
                this.m_cdDrive = cdDrive;
                this.m_track = track;
                this.m_fileMode = fileMode;
                this.m_iTotalTracksSize = iTotalTracksSize;
                this.m_configuration = configuration;
                
                this.m_ripThread = new Thread(new ThreadStart(RipThisTrack));
                this.m_ripThread.Start();

                this.m_timer = new System.Timers.Timer();
                this.m_timer.Elapsed += new System.Timers.ElapsedEventHandler(this.Timer_Elapsed);
                this.m_timer.Enabled = true;
                this.m_timer.Start();
            }

            public Thread Thread()
            {
                return this.m_ripThread;
            }

            public void CancelRipping()
            {
                if (this.m_bCancelRipping == false)
                {
                    this.m_bCancelRipping = true;
                    if (this.TrackRippingCanceled != null)
                    {
                        this.TrackRippingCanceled(this, new TrackRippingEventArgs(this.m_track));
                    }
                }
            }

            #endregion

            #region MethodsProtected
            #endregion

            #region MethodsPrivate

            private void RipThisTrack()
            {
                try
                {
                    this.m_cdDrive.LockCD();
                    using (FileStream fileStream = new FileStream(this.m_track.FileFullName, this.m_fileMode, System.IO.FileAccess.Write))
                    {
                        try
                        {
                            CWaveFormat waveFormat = null;
                            BSE.Platten.BO.CAudioFormat.AudioFormat eAudioFormat = this.m_track.UsedAudioFormat;
                            switch (eAudioFormat)
                            {
                                case BSE.Platten.BO.CAudioFormat.AudioFormat.Wav:
                                    WaveConfigurationControl waveWriter = new WaveConfigurationControl(this.m_configuration);
                                    waveFormat = waveWriter.AudioWriterConfiguration.WaveFormat;
                                    this.m_audioWriter = new WaveWriter(fileStream, waveFormat);
                                    break;
                                case BSE.Platten.BO.CAudioFormat.AudioFormat.Mp3:
                                    waveFormat = new CWaveFormat(
                                        Constants.WavSamplesPerSecDefaultValue,
                                        Constants.WavBitsPerSampleDefaultValue,
                                        Constants.WavChannelsDefaultValue); //Set default values
                                    CMP3ConfigurationControl mp3Writer = new CMP3ConfigurationControl(this.m_configuration);
                                    MP3Configuration mp3WriterConfiguration =
                                        mp3Writer.AudioWriterConfiguration as MP3Configuration;
                                    this.m_audioWriter = new CMP3Writer(
                                        fileStream, waveFormat, mp3WriterConfiguration.Mp3Configuration);
                                    break;
                            }
                            //event wenn das Rippen beginnt
                            if (this.TrackRipping != null)
                            {
                                this.TrackRipping(this, new TrackRippingEventArgs(this.m_track));
                            }

                            this.m_cdDrive.ReadTrack(
                                this.m_track.CDIndex,
                                new CdDataReadEventHandler(this.WriteWaveData),
                                new BSE.CDDrives.CdReadProgressEventHandler(this.CdReadProgress),
                                this.m_iTotalTracksSize);
                        }
                        finally
                        {
#if DEBUG
                            Trace.WriteLine("this.m_audioWriter.Close");
#endif
                            if (this.m_audioWriter != null)
                            {
                                this.m_audioWriter.Flush();
                                this.m_audioWriter.Close();
                                this.m_audioWriter = null;
                            }
                        }
                    }
                }
                catch (System.IO.IOException ioException)
                {
                    this.m_bCancelRipping = true;
                    if (this.m_fileMode == System.IO.FileMode.CreateNew)
                    {
                        if (this.m_ripThread != null && this.m_ripThread.IsAlive)
                        {
                            if (this.TrackExists != null)
                            {
                                this.TrackExists(this, new TrackRippingEventArgs(this.m_track));
                            }
                        }
                    }
                    else
                    {
                        this.m_bCancelRipping = true;
                        GlobalizedMessageBox.Show(
                            this.m_owner,
                            ioException.Message,
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Error);
                    }
                }
                catch (Exception exception)
                {
                    this.m_bCancelRipping = true;
                    GlobalizedMessageBox.Show(
                        this.m_owner,
                        exception.Message,
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Error);
                }
                finally
                {
                    this.m_cdDrive.UnLockCD();
                }
            }

            private void CdReadProgress(object sender, BSE.CDDrives.ReadProgressEventArgs ea)
            {
                ea.CancelRead |= this.m_bCancelRipping;
                if (this.ReadCDProgess != null)
                {
                    this.ReadCDProgess(this, new BSE.CDDrives.ReadProgressEventArgs(
                        ea.Bytes2Read,
                        ea.BytesRead,
                        ea.Seconds2Read,
                        0));
                }
            }

            private void WriteWaveData(object sender, DataReadEventArgs ea)
            {
                if (this.m_audioWriter != null)
                {
#if DEBUG
                    Trace.WriteLine("this.m_audioWriter.Write");
#endif
                    this.m_audioWriter.Write(ea.Data, 0, (int)ea.DataSize);
                }
            }

            private void Timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
            {
                if (this.m_ripThread != null)
                {
                    if (this.m_ripThread.ThreadState == System.Threading.ThreadState.Stopped)
                    {
                        this.m_timer.Stop();
                        if (this.m_bCancelRipping == false)
                        {
                            if (this.TrackRipped != null)
                            {
                                this.TrackRipped(this, new TrackRippingEventArgs(this.m_track));
                            }
                        }
                    }
                }
            }

            #endregion

        }

        #endregion

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Uwe Eichkorn

Switzerland Switzerland
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141216.1 | Last Updated 24 Apr 2010
Article Copyright 2009 by Uwe Eichkorn
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid