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

BSEtunes

, 24 Apr 2010
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.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

using BSE.Platten.Common;
using System.Globalization;
using BSE.Platten.Ripper.Properties;

namespace BSE.Platten.Ripper
{
    public partial class CMP3ConfigurationControl : BaseConfigurationControl , IAudioWriterConfig
    {
        #region Konstanten

        private const string Mpeg1BitRates = "32,40,48,56,64,80,96,112,128,160,192,224,256,320";
        private const string Mpeg2BitRates = "8,16,24,32,40,48,56,64,80,96,112,128,144,160";

        #endregion

        #region FieldsPrivate

        private BSE.Configuration.CConfiguration m_configuration;
        private CWaveFormat m_waveFormat;
        private BE_CONFIG m_beConfig;

        #endregion

        #region Properties

        public AudioWriterConfiguration AudioWriterConfiguration
        {
            get
            {
                MP3ConfigurationData configurationObject = GetConfiguration(this.m_configuration) as MP3ConfigurationData;
                BE_CONFIG config = new BE_CONFIG(this.m_waveFormat, configurationObject.BitRateMpeg1);
                config.format.lhv1.bCopyright = configurationObject.CopyrightBit ? 1 : 0;
                config.format.lhv1.bCRC = configurationObject.CRCCheckSum ? 1 : 0;
                config.format.lhv1.bOriginal = configurationObject.OriginalBit ? 1 : 0;
                config.format.lhv1.bPrivate = configurationObject.PrivateBit ? 1 : 0;
                config.format.lhv1.nMode = configurationObject.MpegMode;

                return new MP3Configuration(this.m_waveFormat, config);
            }
            set
            {
                if (value != null)
                {
                    this.m_waveFormat = value.WaveFormat;
                    this.m_beConfig = ((MP3Configuration)value).Mp3Configuration;
                }
            }
        }

        #endregion

        #region MethodsPublic

        public CMP3ConfigurationControl()
        {
            InitializeComponent();
        }

        public CMP3ConfigurationControl(BSE.Configuration.CConfiguration configuration)
            : this()
        {
            this.m_configuration = configuration;
            this.m_waveFormat = new CWaveFormat(
                Constants.WavSamplesPerSecDefaultValue,
                Constants.WavBitsPerSampleDefaultValue,
                Constants.WavChannelsDefaultValue
                ); //Set default values
            this.m_beConfig = new BE_CONFIG(this.m_waveFormat);
            SetConfigurationValues(this.m_configuration, false);
        }
        
        public void SetConfigurationValues(BSE.Configuration.CConfiguration configuration, bool bExternalOutPutConfiguration)
        {
            LoadConfigurationValues(configuration);
        }

        public override void LoadConfigurationValues(BSE.Configuration.CConfiguration configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration",
                    string.Format(System.Globalization.CultureInfo.InvariantCulture,
                    Resources.IDS_ArgumentNullException,
                    "configuration"));
            }
            
            this.m_configuration = configuration;
            MP3ConfigurationData configurationObject =
                GetConfiguration(configuration) as MP3ConfigurationData;

            if (configurationObject != null)
            {
                this.m_cboBitRate.DataSource = GetBitRatesMpeg1();
                this.m_cboBitRate.ValueMember = "Bitrate";
                this.m_cboBitRate.DisplayMember = "Description";
                this.m_cboBitRate.SelectedValue = configurationObject.BitRateMpeg1;
                if (configurationObject.MpegMode == MpegMode.JointStereo)
                {
                    this.m_rdoJointStereo.Checked = true;
                }
                if (configurationObject.MpegMode == MpegMode.Stereo)
                {
                    this.m_rdo2ChannelStereo.Checked = true;
                }
                this.m_chkCopyRight.Checked = configurationObject.CopyrightBit;
                this.m_chkCRC.Checked = configurationObject.CRCCheckSum;
                this.m_chkOrigin.Checked = configurationObject.OriginalBit;
                this.m_chkPrivate.Checked = configurationObject.PrivateBit;
            }
        }

        public override void SaveConfigurationValues(BSE.Configuration.CConfiguration configuration)
        {
            this.m_configuration = configuration;

            MP3ConfigurationData configurationObject = new MP3ConfigurationData();
            configurationObject.BitRateMpeg1 = uint.Parse(this.m_cboBitRate.SelectedValue.ToString(),CultureInfo.InvariantCulture);
            configurationObject.MpegMode = MpegMode.Stereo;
            if (this.m_rdoJointStereo.Checked == true)
            {
                configurationObject.MpegMode = MpegMode.JointStereo;
            }
            configurationObject.CopyrightBit = this.m_chkCopyRight.Checked;
            configurationObject.CRCCheckSum = this.m_chkCRC.Checked;
            configurationObject.OriginalBit = this.m_chkOrigin.Checked;
            configurationObject.PrivateBit = this.m_chkPrivate.Checked;

            configuration.SetValue(
                BaseConfigurationControl.OptionsConfiguration,
                typeof(MP3ConfigurationData).Name,
                configurationObject);
            OnConfigChanging(new System.EventArgs());
        }

        public static IConfigurationData GetConfiguration(BSE.Configuration.CConfiguration configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(
                    string.Format(
                    CultureInfo.InvariantCulture, Resources.IDS_ArgumentNullException, "configuration"));
            }
            
            return configuration.GetValue(
                BSE.Platten.Common.BaseConfigurationControl.OptionsConfiguration,
                typeof(MP3ConfigurationData).Name,
                new MP3ConfigurationData()) as MP3ConfigurationData;
        }

        #endregion

        #region MethodsPrivate
        
        private void m_btnAboutLame_Click(object sender, EventArgs e)
        {
            CLameAbout  lameAbout = new CLameAbout();
            lameAbout.ShowDialog();
        }
        
        private static List<BitRate> GetBitRatesMpeg1()
        {
            List<BitRate> bitRateList = new List<BitRate>();
            
            BitRate bitRateMpeg32 = new BitRate();
            bitRateMpeg32.Bitrate = 32;
            bitRateMpeg32.Description = 32 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg32);
            
            BitRate bitRateMpeg40 = new BitRate();
            bitRateMpeg40.Bitrate = 40;
            bitRateMpeg40.Description = 40 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg40);
            
            BitRate bitRateMpeg48 = new BitRate();
            bitRateMpeg48.Bitrate = 48;
            bitRateMpeg48.Description = 48 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg48);
            
            BitRate bitRateMpeg56 = new BitRate();
            bitRateMpeg56.Bitrate = 56;
            bitRateMpeg56.Description = 56 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg56);
            
            BitRate bitRateMpeg64 = new BitRate();
            bitRateMpeg64.Bitrate = 64;
            bitRateMpeg64.Description = 64 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg64);
            
            BitRate bitRateMpeg80 = new BitRate();
            bitRateMpeg80.Bitrate = 80;
            bitRateMpeg80.Description = 80 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg80);
            
            BitRate bitRateMpeg96 = new BitRate();
            bitRateMpeg96.Bitrate = 96;
            bitRateMpeg96.Description = 96 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg96);
            
            BitRate bitRateMpeg112 = new BitRate();
            bitRateMpeg112.Bitrate = 112;
            bitRateMpeg112.Description = 112 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg112);
            
            BitRate bitRateMpeg128 = new BitRate();
            bitRateMpeg128.Bitrate = 128;
            bitRateMpeg128.Description = 128 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg128);
            
            BitRate bitRateMpeg160 = new BitRate();
            bitRateMpeg160.Bitrate = 160;
            bitRateMpeg160.Description = 160 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg160);
            
            BitRate bitRateMpeg192 = new BitRate();
            bitRateMpeg192.Bitrate = 192;
            bitRateMpeg192.Description = 192 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg192);
            
            BitRate bitRateMpeg224 = new BitRate();
            bitRateMpeg224.Bitrate = 224;
            bitRateMpeg224.Description = 224 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg224);
            
            BitRate bitRateMpeg256 = new BitRate();
            bitRateMpeg256.Bitrate = 256;
            bitRateMpeg256.Description = 256 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg256);
            
            BitRate bitRateMpeg320 = new BitRate();
            bitRateMpeg320.Bitrate = 320;
            bitRateMpeg320.Description = 320 + @"kBit/sek";
            bitRateList.Add(bitRateMpeg320);

            return bitRateList;
        }

        #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 | Mobile
Web03 | 2.8.140916.1 | Last Updated 24 Apr 2010
Article Copyright 2009 by Uwe Eichkorn
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid