From a866b7934140c5805a8894568c2809480eb97533 Mon Sep 17 00:00:00 2001 From: chudov Date: Tue, 6 Apr 2010 14:22:27 +0000 Subject: [PATCH] CUEPlayer --- CUEPlayer/Browser.Designer.cs | 69 + CUEPlayer/Browser.cs | 57 + CUEPlayer/Browser.resx | 120 ++ CUEPlayer/CUEPlayer.csproj | 261 +++ CUEPlayer/CUEPlayer.csproj.user | 21 + CUEPlayer/CUEPlayer.sdf | Bin 0 -> 86016 bytes CUEPlayer/CUEPlayerDataSet.Designer.cs | 227 +++ CUEPlayer/CUEPlayerDataSet.xsc | 1 + CUEPlayer/CUEPlayerDataSet.xsd | 19 + CUEPlayer/CUEPlayerDataSet.xss | 1 + CUEPlayer/DataSet1.Designer.cs | 1521 +++++++++++++++++ CUEPlayer/DataSet1.cs | 9 + CUEPlayer/DataSet1.xsc | 9 + CUEPlayer/DataSet1.xsd | 119 ++ CUEPlayer/DataSet1.xss | 1 + CUEPlayer/Deck.Designer.cs | 290 ++++ CUEPlayer/Deck.cs | 317 ++++ CUEPlayer/Deck.resx | 123 ++ CUEPlayer/Output.Designer.cs | 171 ++ CUEPlayer/Output.cs | 106 ++ CUEPlayer/Output.resx | 123 ++ CUEPlayer/Playlist.Designer.cs | 121 ++ CUEPlayer/Playlist.cs | 165 ++ CUEPlayer/Playlist.resx | 123 ++ CUEPlayer/Program.cs | 20 + CUEPlayer/Properties/AssemblyInfo.cs | 36 + .../DataSources/frmCUEPlayer.datasource | 10 + CUEPlayer/Properties/Resources.Designer.cs | 147 ++ CUEPlayer/Properties/Resources.resx | 157 ++ CUEPlayer/Properties/Settings.Designer.cs | 36 + CUEPlayer/Properties/Settings.settings | 14 + CUEPlayer/Resources/control_eject.png | Bin 0 -> 603 bytes CUEPlayer/Resources/control_eject_blue.png | Bin 0 -> 727 bytes CUEPlayer/Resources/control_end_blue.png | Bin 0 -> 737 bytes .../Resources/control_equalizer_blue.png | Bin 0 -> 764 bytes .../Resources/control_fastforward_blue.png | Bin 0 -> 736 bytes CUEPlayer/Resources/control_pause_blue.png | Bin 0 -> 721 bytes CUEPlayer/Resources/control_play_blue.png | Bin 0 -> 717 bytes CUEPlayer/Resources/control_repeat_blue.png | Bin 0 -> 750 bytes CUEPlayer/Resources/control_rewind_blue.png | Bin 0 -> 745 bytes CUEPlayer/Resources/control_start_blue.png | Bin 0 -> 720 bytes CUEPlayer/Resources/control_stop_blue.png | Bin 0 -> 695 bytes CUEPlayer/Resources/ctdb.png | Bin 0 -> 22906 bytes CUEPlayer/app.config | 10 + CUEPlayer/frmCUEPlayer.Designer.cs | 51 + CUEPlayer/frmCUEPlayer.cs | 354 ++++ CUEPlayer/frmCUEPlayer.resx | 123 ++ CUERipper/Properties/Resources.ru-RU.resx | 150 ++ CUERipper/frmCUERipper.ru-RU.resx | 157 ++ CUETools.Codecs.CoreAudio/WasapiOut.cs | 105 +- CUETools.Codecs/Codecs.cs | 3 + CUETools.DSP.Mixer/Mixer.cs | 37 +- .../CUETools.TestCodecs.csproj | 8 +- .../CUETools.TestCodecs/SOXResamplerTest.cs | 100 ++ CUETools/CUETools.sln | 41 + CUETools/CUETools1.vsmdi | 2 +- 56 files changed, 5494 insertions(+), 41 deletions(-) create mode 100644 CUEPlayer/Browser.Designer.cs create mode 100644 CUEPlayer/Browser.cs create mode 100644 CUEPlayer/Browser.resx create mode 100644 CUEPlayer/CUEPlayer.csproj create mode 100644 CUEPlayer/CUEPlayer.csproj.user create mode 100644 CUEPlayer/CUEPlayer.sdf create mode 100644 CUEPlayer/CUEPlayerDataSet.Designer.cs create mode 100644 CUEPlayer/CUEPlayerDataSet.xsc create mode 100644 CUEPlayer/CUEPlayerDataSet.xsd create mode 100644 CUEPlayer/CUEPlayerDataSet.xss create mode 100644 CUEPlayer/DataSet1.Designer.cs create mode 100644 CUEPlayer/DataSet1.cs create mode 100644 CUEPlayer/DataSet1.xsc create mode 100644 CUEPlayer/DataSet1.xsd create mode 100644 CUEPlayer/DataSet1.xss create mode 100644 CUEPlayer/Deck.Designer.cs create mode 100644 CUEPlayer/Deck.cs create mode 100644 CUEPlayer/Deck.resx create mode 100644 CUEPlayer/Output.Designer.cs create mode 100644 CUEPlayer/Output.cs create mode 100644 CUEPlayer/Output.resx create mode 100644 CUEPlayer/Playlist.Designer.cs create mode 100644 CUEPlayer/Playlist.cs create mode 100644 CUEPlayer/Playlist.resx create mode 100644 CUEPlayer/Program.cs create mode 100644 CUEPlayer/Properties/AssemblyInfo.cs create mode 100644 CUEPlayer/Properties/DataSources/frmCUEPlayer.datasource create mode 100644 CUEPlayer/Properties/Resources.Designer.cs create mode 100644 CUEPlayer/Properties/Resources.resx create mode 100644 CUEPlayer/Properties/Settings.Designer.cs create mode 100644 CUEPlayer/Properties/Settings.settings create mode 100644 CUEPlayer/Resources/control_eject.png create mode 100644 CUEPlayer/Resources/control_eject_blue.png create mode 100644 CUEPlayer/Resources/control_end_blue.png create mode 100644 CUEPlayer/Resources/control_equalizer_blue.png create mode 100644 CUEPlayer/Resources/control_fastforward_blue.png create mode 100644 CUEPlayer/Resources/control_pause_blue.png create mode 100644 CUEPlayer/Resources/control_play_blue.png create mode 100644 CUEPlayer/Resources/control_repeat_blue.png create mode 100644 CUEPlayer/Resources/control_rewind_blue.png create mode 100644 CUEPlayer/Resources/control_start_blue.png create mode 100644 CUEPlayer/Resources/control_stop_blue.png create mode 100644 CUEPlayer/Resources/ctdb.png create mode 100644 CUEPlayer/app.config create mode 100644 CUEPlayer/frmCUEPlayer.Designer.cs create mode 100644 CUEPlayer/frmCUEPlayer.cs create mode 100644 CUEPlayer/frmCUEPlayer.resx create mode 100644 CUERipper/Properties/Resources.ru-RU.resx create mode 100644 CUERipper/frmCUERipper.ru-RU.resx create mode 100644 CUETools/CUETools.TestCodecs/SOXResamplerTest.cs diff --git a/CUEPlayer/Browser.Designer.cs b/CUEPlayer/Browser.Designer.cs new file mode 100644 index 0000000..bd45191 --- /dev/null +++ b/CUEPlayer/Browser.Designer.cs @@ -0,0 +1,69 @@ +namespace CUEPlayer +{ + partial class Browser + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.fileSystemTreeView1 = new CUEControls.FileSystemTreeView(); + this.SuspendLayout(); + // + // fileSystemTreeView1 + // + this.fileSystemTreeView1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.fileSystemTreeView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.fileSystemTreeView1.Location = new System.Drawing.Point(0, 0); + this.fileSystemTreeView1.Name = "fileSystemTreeView1"; + this.fileSystemTreeView1.ShowLines = false; + this.fileSystemTreeView1.ShowRootLines = false; + this.fileSystemTreeView1.Size = new System.Drawing.Size(284, 264); + this.fileSystemTreeView1.SpecialFolders = new CUEControls.ExtraSpecialFolder[] { + CUEControls.ExtraSpecialFolder.MyComputer, + CUEControls.ExtraSpecialFolder.MyMusic, + CUEControls.ExtraSpecialFolder.CommonMusic}; + this.fileSystemTreeView1.TabIndex = 1; + this.fileSystemTreeView1.NodeExpand += new CUEControls.FileSystemTreeViewNodeExpandHandler(this.fileSystemTreeView1_NodeExpand); + // + // Browser + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(284, 264); + this.ControlBox = false; + this.Controls.Add(this.fileSystemTreeView1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; + this.Name = "Browser"; + this.Text = "Browser"; + this.Load += new System.EventHandler(this.Browser_Load); + this.ResumeLayout(false); + + } + + #endregion + + private CUEControls.FileSystemTreeView fileSystemTreeView1; + } +} \ No newline at end of file diff --git a/CUEPlayer/Browser.cs b/CUEPlayer/Browser.cs new file mode 100644 index 0000000..d21d465 --- /dev/null +++ b/CUEPlayer/Browser.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using CUEControls; +using CUETools.Codecs; +using CUETools.Processor; + +namespace CUEPlayer +{ + public partial class Browser : Form + { + private CUEConfig _config; + + public Browser() + { + InitializeComponent(); + } + + public void Init(frmCUEPlayer parent) + { + _config = parent.Config; + MdiParent = parent; + Show(); + fileSystemTreeView1.IconManager = parent.IconMgr; + fileSystemTreeView1.SelectedFolder = ExtraSpecialFolder.MyMusic; + } + + internal FileSystemTreeView TreeView + { + get + { + return fileSystemTreeView1; + } + } + + private void fileSystemTreeView1_NodeExpand(object sender, CUEControls.FileSystemTreeViewNodeExpandEventArgs e) + { + List fileGroups = CUESheet.ScanFolder(_config, e.files); + foreach (FileGroupInfo fileGroup in fileGroups) + { + TreeNode node = fileSystemTreeView1.NewNode(fileGroup.main, fileGroup.type == FileGroupInfoType.Folder); + if (fileGroup.type == FileGroupInfoType.TrackFiles) + node.Text = node.Text + ": " + fileGroup.files.Count.ToString() + " files"; + e.node.Nodes.Add(node); + } + } + + private void Browser_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/CUEPlayer/Browser.resx b/CUEPlayer/Browser.resx new file mode 100644 index 0000000..ff31a6d --- /dev/null +++ b/CUEPlayer/Browser.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/CUEPlayer/CUEPlayer.csproj b/CUEPlayer/CUEPlayer.csproj new file mode 100644 index 0000000..d16a30b --- /dev/null +++ b/CUEPlayer/CUEPlayer.csproj @@ -0,0 +1,261 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {04E59836-0C5A-4B9B-8899-848D56911758} + WinExe + Properties + CUEPlayer + CUEPlayer + v2.0 + 512 + false + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + ..\bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\bin\Release\ + TRACE + prompt + 4 + true + + + + + + + + + + + + + + Form + + + Browser.cs + + + DataSet1.xsd + Component + + + True + True + DataSet1.xsd + + + Form + + + Deck.cs + + + Form + + + frmCUEPlayer.cs + + + Form + + + Output.cs + + + Form + + + Playlist.cs + + + + + Browser.cs + + + Deck.cs + + + frmCUEPlayer.cs + + + Output.cs + + + Playlist.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + {CA4D64E6-6544-4A29-8BA5-7DB08D50D072} + CUEControls + + + {1DD41038-D885-46C5-8DDE-E0B82F066584} + CUETools.CDImage + + + {FAD09EE2-D6B2-4A8E-9F1C-2A9FB293661A} + CUETools.Codecs.CoreAudio + + + {6458A13A-30EF-45A9-9D58-E5031B17BEE2} + CUETools.Codecs + + + {AFF1AFF9-839D-4892-88CD-8BD09BAFC1D2} + CUETools.DSP.Mixer + + + {A6303861-CA06-4C2C-A104-BA9291538F6F} + CUETools.DSP.Resampler + + + {4911BD82-49EF-4858-8B51-5394F86739A4} + CUETools.Processor + + + {8DD1E84B-0B03-4C0B-9B42-1E49F75E7CB1} + ProgressODoom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DataSet1.xsd + + + Designer + MSDataSetGenerator + DataSet1.Designer.cs + + + DataSet1.xsd + + + + + + + False + .NET Framework Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + False + .NET Framework 3.5 SP1 + false + + + False + SQL Server Compact 3.5 + true + + + + + + + + + + \ No newline at end of file diff --git a/CUEPlayer/CUEPlayer.csproj.user b/CUEPlayer/CUEPlayer.csproj.user new file mode 100644 index 0000000..e75ce89 --- /dev/null +++ b/CUEPlayer/CUEPlayer.csproj.user @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + en-US + false + + + false + + \ No newline at end of file diff --git a/CUEPlayer/CUEPlayer.sdf b/CUEPlayer/CUEPlayer.sdf new file mode 100644 index 0000000000000000000000000000000000000000..7626ba6a2e7104b8f8bd2f31fc7d7c92a7f17ffc GIT binary patch literal 86016 zcmb>3n(NKLz`(!(A{ZDL=2n|BFfuSOctH6~P@0p4fq{pCfq|KUmEo-jR1nN(VDMsM zU|?fl<41_nh{ehRb{maMACbm>Wny5M$H>6I$-uxM&A`BLL79PJB?|+Cx;!K}KCX#wSi%D-W@G`M!BOQFd71*Aut*OqaiRF0;3@? z8UmvsFd71*Aut*OqaiR%hQMeDjE2By z2#kinXb6mkz-S1JhQMeDjE2By2n^8>0QLW6oqgVMvN$k^LH)qW!oa|I0kXQC9kiGo zG!Ov7V4())2KEN-hLqy8#Nw31l*HncVh{<{J4%g)z-S1JhQMeDjE2By2#kinXb6mk zz-S1JhQMeDjE2By2n@myxWL53b^0X_Gm8O(57c>}u0Dv##sVU#k7;c_^<7Lm6ZIGv z7?c@Iv0`Ihrd9I{|xGj zf7tzhBpEvr6;tv2f6$f+*m{VO7?h)a9u0w!6au4peI&*9s9#4zU^E0qLtr!nMnhmU z1V%$(aE8DQhchf}EDj9fQ0FnTd=TWhPzvU$fyf8{|Nloi{@)$MV_*Os69AGW0ypqB zh%unT`1s(;V*jM9)Z~(4hJc*J%ACyN60lJqD;wk;{{QD-fG$K}U@&B0V8*zAfEghV z)`&tha5nHTphCDUnJHkUaElZW1{pIl$b&EU1FL`%91JHI7#LnKL%FC_17`yt11f}D zRFGJb0agvS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2#kinXb6mg z(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R z7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7 zfzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z w5Eu=C(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4S~@R7!85Z5FjE10Kg&8`2YX_ literal 0 HcmV?d00001 diff --git a/CUEPlayer/CUEPlayerDataSet.Designer.cs b/CUEPlayer/CUEPlayerDataSet.Designer.cs new file mode 100644 index 0000000..952e549 --- /dev/null +++ b/CUEPlayer/CUEPlayerDataSet.Designer.cs @@ -0,0 +1,227 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4200 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 + +namespace CUEPlayer { + + + /// + ///Represents a strongly typed in-memory cache of data. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + [global::System.Serializable()] + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] + [global::System.Xml.Serialization.XmlRootAttribute("CUEPlayerDataSet")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] + public partial class CUEPlayerDataSet : global::System.Data.DataSet { + + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public CUEPlayerDataSet() { + this.BeginInit(); + this.InitClass(); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + base.Relations.CollectionChanged += schemaChangedHandler; + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected CUEPlayerDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context, false) { + if ((this.IsBinarySerialized(info, context) == true)) { + this.InitVars(false); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + this.Tables.CollectionChanged += schemaChangedHandler1; + this.Relations.CollectionChanged += schemaChangedHandler1; + return; + } + string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string)))); + if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + } + this.GetSerializationData(info, context); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + this.Relations.CollectionChanged += schemaChangedHandler; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.BrowsableAttribute(true)] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] + public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { + get { + return this._schemaSerializationMode; + } + set { + this._schemaSerializationMode = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataTableCollection Tables { + get { + return base.Tables; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataRelationCollection Relations { + get { + return base.Relations; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void InitializeDerivedDataSet() { + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public override global::System.Data.DataSet Clone() { + CUEPlayerDataSet cln = ((CUEPlayerDataSet)(base.Clone())); + cln.InitVars(); + cln.SchemaSerializationMode = this.SchemaSerializationMode; + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override bool ShouldSerializeTables() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override bool ShouldSerializeRelations() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { + if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + this.Reset(); + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXml(reader); + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXml(reader); + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { + global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); + this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); + stream.Position = 0; + return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal void InitVars() { + this.InitVars(true); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal void InitVars(bool initTable) { + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private void InitClass() { + this.DataSetName = "CUEPlayerDataSet"; + this.Prefix = ""; + this.Namespace = "http://tempuri.org/CUEPlayerDataSet.xsd"; + this.EnforceConstraints = true; + this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { + if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + CUEPlayerDataSet ds = new CUEPlayerDataSet(); + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); + any.Namespace = ds.Namespace; + sequence.Items.Add(any); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/CUEPlayer/CUEPlayerDataSet.xsc b/CUEPlayer/CUEPlayerDataSet.xsc new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/CUEPlayer/CUEPlayerDataSet.xsc @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/CUEPlayer/CUEPlayerDataSet.xsd b/CUEPlayer/CUEPlayerDataSet.xsd new file mode 100644 index 0000000..2c3ad68 --- /dev/null +++ b/CUEPlayer/CUEPlayerDataSet.xsd @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CUEPlayer/CUEPlayerDataSet.xss b/CUEPlayer/CUEPlayerDataSet.xss new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/CUEPlayer/CUEPlayerDataSet.xss @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/CUEPlayer/DataSet1.Designer.cs b/CUEPlayer/DataSet1.Designer.cs new file mode 100644 index 0000000..c9f6c9e --- /dev/null +++ b/CUEPlayer/DataSet1.Designer.cs @@ -0,0 +1,1521 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4200 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 + +namespace CUEPlayer { + + + /// + ///Represents a strongly typed in-memory cache of data. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + [global::System.Serializable()] + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")] + [global::System.Xml.Serialization.XmlRootAttribute("DataSet1")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] + public partial class DataSet1 : global::System.Data.DataSet { + + private PlaylistDataTable tablePlaylist; + + private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public DataSet1() { + this.BeginInit(); + this.InitClass(); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + base.Relations.CollectionChanged += schemaChangedHandler; + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected DataSet1(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context, false) { + if ((this.IsBinarySerialized(info, context) == true)) { + this.InitVars(false); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + this.Tables.CollectionChanged += schemaChangedHandler1; + this.Relations.CollectionChanged += schemaChangedHandler1; + return; + } + string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string)))); + if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + if ((ds.Tables["Playlist"] != null)) { + base.Tables.Add(new PlaylistDataTable(ds.Tables["Playlist"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema))); + } + this.GetSerializationData(info, context); + global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged); + base.Tables.CollectionChanged += schemaChangedHandler; + this.Relations.CollectionChanged += schemaChangedHandler; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Browsable(false)] + [global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)] + public PlaylistDataTable Playlist { + get { + return this.tablePlaylist; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.BrowsableAttribute(true)] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)] + public override global::System.Data.SchemaSerializationMode SchemaSerializationMode { + get { + return this._schemaSerializationMode; + } + set { + this._schemaSerializationMode = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataTableCollection Tables { + get { + return base.Tables; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)] + public new global::System.Data.DataRelationCollection Relations { + get { + return base.Relations; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void InitializeDerivedDataSet() { + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public override global::System.Data.DataSet Clone() { + DataSet1 cln = ((DataSet1)(base.Clone())); + cln.InitVars(); + cln.SchemaSerializationMode = this.SchemaSerializationMode; + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override bool ShouldSerializeTables() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override bool ShouldSerializeRelations() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) { + if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) { + this.Reset(); + global::System.Data.DataSet ds = new global::System.Data.DataSet(); + ds.ReadXml(reader); + if ((ds.Tables["Playlist"] != null)) { + base.Tables.Add(new PlaylistDataTable(ds.Tables["Playlist"])); + } + this.DataSetName = ds.DataSetName; + this.Prefix = ds.Prefix; + this.Namespace = ds.Namespace; + this.Locale = ds.Locale; + this.CaseSensitive = ds.CaseSensitive; + this.EnforceConstraints = ds.EnforceConstraints; + this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add); + this.InitVars(); + } + else { + this.ReadXml(reader); + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() { + global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream(); + this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null)); + stream.Position = 0; + return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal void InitVars() { + this.InitVars(true); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal void InitVars(bool initTable) { + this.tablePlaylist = ((PlaylistDataTable)(base.Tables["Playlist"])); + if ((initTable == true)) { + if ((this.tablePlaylist != null)) { + this.tablePlaylist.InitVars(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private void InitClass() { + this.DataSetName = "DataSet1"; + this.Prefix = ""; + this.Namespace = "http://tempuri.org/DataSet1.xsd"; + this.EnforceConstraints = true; + this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + this.tablePlaylist = new PlaylistDataTable(); + base.Tables.Add(this.tablePlaylist); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private bool ShouldSerializePlaylist() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) { + if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) { + this.InitVars(); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + DataSet1 ds = new DataSet1(); + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny(); + any.Namespace = ds.Namespace; + sequence.Items.Add(any); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + + public delegate void PlaylistRowChangeEventHandler(object sender, PlaylistRowChangeEvent e); + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class PlaylistDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable { + + private global::System.Data.DataColumn columnid; + + private global::System.Data.DataColumn columnpath; + + private global::System.Data.DataColumn columnartist; + + private global::System.Data.DataColumn columntitle; + + private global::System.Data.DataColumn columnalbum; + + private global::System.Data.DataColumn columnlength; + + private global::System.Data.DataColumn columntrack; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public PlaylistDataTable() { + this.TableName = "Playlist"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal PlaylistDataTable(global::System.Data.DataTable table) { + this.TableName = table.TableName; + if ((table.CaseSensitive != table.DataSet.CaseSensitive)) { + this.CaseSensitive = table.CaseSensitive; + } + if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) { + this.Locale = table.Locale; + } + if ((table.Namespace != table.DataSet.Namespace)) { + this.Namespace = table.Namespace; + } + this.Prefix = table.Prefix; + this.MinimumCapacity = table.MinimumCapacity; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected PlaylistDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) : + base(info, context) { + this.InitVars(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn idColumn { + get { + return this.columnid; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn pathColumn { + get { + return this.columnpath; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn artistColumn { + get { + return this.columnartist; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn titleColumn { + get { + return this.columntitle; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn albumColumn { + get { + return this.columnalbum; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn lengthColumn { + get { + return this.columnlength; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataColumn trackColumn { + get { + return this.columntrack; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Browsable(false)] + public int Count { + get { + return this.Rows.Count; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public PlaylistRow this[int index] { + get { + return ((PlaylistRow)(this.Rows[index])); + } + } + + public event PlaylistRowChangeEventHandler PlaylistRowChanging; + + public event PlaylistRowChangeEventHandler PlaylistRowChanged; + + public event PlaylistRowChangeEventHandler PlaylistRowDeleting; + + public event PlaylistRowChangeEventHandler PlaylistRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void AddPlaylistRow(PlaylistRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public PlaylistRow AddPlaylistRow(string path, string artist, string title, string album, int length, int track) { + PlaylistRow rowPlaylistRow = ((PlaylistRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + path, + artist, + title, + album, + length, + track}; + rowPlaylistRow.ItemArray = columnValuesArray; + this.Rows.Add(rowPlaylistRow); + return rowPlaylistRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public PlaylistRow FindByid(int id) { + return ((PlaylistRow)(this.Rows.Find(new object[] { + id}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public virtual global::System.Collections.IEnumerator GetEnumerator() { + return this.Rows.GetEnumerator(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public override global::System.Data.DataTable Clone() { + PlaylistDataTable cln = ((PlaylistDataTable)(base.Clone())); + cln.InitVars(); + return cln; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override global::System.Data.DataTable CreateInstance() { + return new PlaylistDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal void InitVars() { + this.columnid = base.Columns["id"]; + this.columnpath = base.Columns["path"]; + this.columnartist = base.Columns["artist"]; + this.columntitle = base.Columns["title"]; + this.columnalbum = base.Columns["album"]; + this.columnlength = base.Columns["length"]; + this.columntrack = base.Columns["track"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private void InitClass() { + this.columnid = new global::System.Data.DataColumn("id", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnid); + this.columnpath = new global::System.Data.DataColumn("path", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnpath); + this.columnartist = new global::System.Data.DataColumn("artist", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnartist); + this.columntitle = new global::System.Data.DataColumn("title", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columntitle); + this.columnalbum = new global::System.Data.DataColumn("album", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnalbum); + this.columnlength = new global::System.Data.DataColumn("length", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnlength); + this.columntrack = new global::System.Data.DataColumn("track", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columntrack); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnid}, true)); + this.columnid.AutoIncrement = true; + this.columnid.AutoIncrementSeed = -1; + this.columnid.AutoIncrementStep = -1; + this.columnid.AllowDBNull = false; + this.columnid.ReadOnly = true; + this.columnid.Unique = true; + this.columnpath.AllowDBNull = false; + this.columnpath.MaxLength = 100; + this.columnartist.MaxLength = 100; + this.columntitle.MaxLength = 100; + this.columnalbum.MaxLength = 100; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public PlaylistRow NewPlaylistRow() { + return ((PlaylistRow)(this.NewRow())); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) { + return new PlaylistRow(builder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override global::System.Type GetRowType() { + return typeof(PlaylistRow); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanged(e); + if ((this.PlaylistRowChanged != null)) { + this.PlaylistRowChanged(this, new PlaylistRowChangeEvent(((PlaylistRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowChanging(e); + if ((this.PlaylistRowChanging != null)) { + this.PlaylistRowChanging(this, new PlaylistRowChangeEvent(((PlaylistRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleted(e); + if ((this.PlaylistRowDeleted != null)) { + this.PlaylistRowDeleted(this, new PlaylistRowChangeEvent(((PlaylistRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) { + base.OnRowDeleting(e); + if ((this.PlaylistRowDeleting != null)) { + this.PlaylistRowDeleting(this, new PlaylistRowChangeEvent(((PlaylistRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void RemovePlaylistRow(PlaylistRow row) { + this.Rows.Remove(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) { + global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType(); + global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence(); + DataSet1 ds = new DataSet1(); + global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny(); + any1.Namespace = "http://www.w3.org/2001/XMLSchema"; + any1.MinOccurs = new decimal(0); + any1.MaxOccurs = decimal.MaxValue; + any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any1); + global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny(); + any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"; + any2.MinOccurs = new decimal(1); + any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax; + sequence.Items.Add(any2); + global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute1.Name = "namespace"; + attribute1.FixedValue = ds.Namespace; + type.Attributes.Add(attribute1); + global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute(); + attribute2.Name = "tableTypeName"; + attribute2.FixedValue = "PlaylistDataTable"; + type.Attributes.Add(attribute2); + type.Particle = sequence; + global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable(); + if (xs.Contains(dsSchema.TargetNamespace)) { + global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream(); + global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream(); + try { + global::System.Xml.Schema.XmlSchema schema = null; + dsSchema.Write(s1); + for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) { + schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current)); + s2.SetLength(0); + schema.Write(s2); + if ((s1.Length == s2.Length)) { + s1.Position = 0; + s2.Position = 0; + for (; ((s1.Position != s1.Length) + && (s1.ReadByte() == s2.ReadByte())); ) { + ; + } + if ((s1.Position == s1.Length)) { + return type; + } + } + } + } + finally { + if ((s1 != null)) { + s1.Close(); + } + if ((s2 != null)) { + s2.Close(); + } + } + } + xs.Add(dsSchema); + return type; + } + } + + /// + ///Represents strongly named DataRow class. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + public partial class PlaylistRow : global::System.Data.DataRow { + + private PlaylistDataTable tablePlaylist; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal PlaylistRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tablePlaylist = ((PlaylistDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public int id { + get { + return ((int)(this[this.tablePlaylist.idColumn])); + } + set { + this[this.tablePlaylist.idColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public string path { + get { + return ((string)(this[this.tablePlaylist.pathColumn])); + } + set { + this[this.tablePlaylist.pathColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public string artist { + get { + try { + return ((string)(this[this.tablePlaylist.artistColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'artist\' in table \'Playlist\' is DBNull.", e); + } + } + set { + this[this.tablePlaylist.artistColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public string title { + get { + try { + return ((string)(this[this.tablePlaylist.titleColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'title\' in table \'Playlist\' is DBNull.", e); + } + } + set { + this[this.tablePlaylist.titleColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public string album { + get { + try { + return ((string)(this[this.tablePlaylist.albumColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'album\' in table \'Playlist\' is DBNull.", e); + } + } + set { + this[this.tablePlaylist.albumColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public int length { + get { + try { + return ((int)(this[this.tablePlaylist.lengthColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'length\' in table \'Playlist\' is DBNull.", e); + } + } + set { + this[this.tablePlaylist.lengthColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public int track { + get { + try { + return ((int)(this[this.tablePlaylist.trackColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'track\' in table \'Playlist\' is DBNull.", e); + } + } + set { + this[this.tablePlaylist.trackColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool IsartistNull() { + return this.IsNull(this.tablePlaylist.artistColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void SetartistNull() { + this[this.tablePlaylist.artistColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool IstitleNull() { + return this.IsNull(this.tablePlaylist.titleColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void SettitleNull() { + this[this.tablePlaylist.titleColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool IsalbumNull() { + return this.IsNull(this.tablePlaylist.albumColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void SetalbumNull() { + this[this.tablePlaylist.albumColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool IslengthNull() { + return this.IsNull(this.tablePlaylist.lengthColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void SetlengthNull() { + this[this.tablePlaylist.lengthColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool IstrackNull() { + return this.IsNull(this.tablePlaylist.trackColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public void SettrackNull() { + this[this.tablePlaylist.trackColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + public class PlaylistRowChangeEvent : global::System.EventArgs { + + private PlaylistRow eventRow; + + private global::System.Data.DataRowAction eventAction; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public PlaylistRowChangeEvent(PlaylistRow row, global::System.Data.DataRowAction action) { + this.eventRow = row; + this.eventAction = action; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public PlaylistRow Row { + get { + return this.eventRow; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public global::System.Data.DataRowAction Action { + get { + return this.eventAction; + } + } + } + } +} +namespace CUEPlayer.DataSet1TableAdapters { + + + /// + ///Represents the connection and commands used to retrieve and save data. + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DataObjectAttribute(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" + + ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public partial class PlaylistTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.SqlServerCe.SqlCeDataAdapter _adapter; + + private global::System.Data.SqlServerCe.SqlCeConnection _connection; + + private global::System.Data.SqlServerCe.SqlCeTransaction _transaction; + + private global::System.Data.SqlServerCe.SqlCeCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public PlaylistTableAdapter() { + this.ClearBeforeFill = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected internal global::System.Data.SqlServerCe.SqlCeDataAdapter Adapter { + get { + if ((this._adapter == null)) { + this.InitAdapter(); + } + return this._adapter; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal global::System.Data.SqlServerCe.SqlCeConnection Connection { + get { + if ((this._connection == null)) { + this.InitConnection(); + } + return this._connection; + } + set { + this._connection = value; + if ((this.Adapter.InsertCommand != null)) { + this.Adapter.InsertCommand.Connection = value; + } + if ((this.Adapter.DeleteCommand != null)) { + this.Adapter.DeleteCommand.Connection = value; + } + if ((this.Adapter.UpdateCommand != null)) { + this.Adapter.UpdateCommand.Connection = value; + } + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + if ((this.CommandCollection[i] != null)) { + ((global::System.Data.SqlServerCe.SqlCeCommand)(this.CommandCollection[i])).Connection = value; + } + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal global::System.Data.SqlServerCe.SqlCeTransaction Transaction { + get { + return this._transaction; + } + set { + this._transaction = value; + for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) { + this.CommandCollection[i].Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.DeleteCommand != null))) { + this.Adapter.DeleteCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.InsertCommand != null))) { + this.Adapter.InsertCommand.Transaction = this._transaction; + } + if (((this.Adapter != null) + && (this.Adapter.UpdateCommand != null))) { + this.Adapter.UpdateCommand.Transaction = this._transaction; + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected global::System.Data.SqlServerCe.SqlCeCommand[] CommandCollection { + get { + if ((this._commandCollection == null)) { + this.InitCommandCollection(); + } + return this._commandCollection; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool ClearBeforeFill { + get { + return this._clearBeforeFill; + } + set { + this._clearBeforeFill = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private void InitAdapter() { + this._adapter = new global::System.Data.SqlServerCe.SqlCeDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "Playlist"; + tableMapping.ColumnMappings.Add("id", "id"); + tableMapping.ColumnMappings.Add("path", "path"); + tableMapping.ColumnMappings.Add("artist", "artist"); + tableMapping.ColumnMappings.Add("title", "title"); + tableMapping.ColumnMappings.Add("album", "album"); + tableMapping.ColumnMappings.Add("length", "length"); + tableMapping.ColumnMappings.Add("track", "track"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.SqlServerCe.SqlCeCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM [Playlist] WHERE (([id] = @p1))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "id", global::System.Data.DataRowVersion.Original, null)); + this._adapter.InsertCommand = new global::System.Data.SqlServerCe.SqlCeCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO [Playlist] ([path], [artist], [title], [album], [length], [track]) VA" + + "LUES (@p1, @p2, @p3, @p4, @p5, @p6)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p1", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "path", global::System.Data.DataRowVersion.Current, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p2", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "artist", global::System.Data.DataRowVersion.Current, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p3", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "title", global::System.Data.DataRowVersion.Current, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p4", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "album", global::System.Data.DataRowVersion.Current, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p5", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "length", global::System.Data.DataRowVersion.Current, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p6", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "track", global::System.Data.DataRowVersion.Current, null)); + this._adapter.UpdateCommand = new global::System.Data.SqlServerCe.SqlCeCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = "UPDATE [Playlist] SET [path] = @p1, [artist] = @p2, [title] = @p3, [album] = @p4," + + " [length] = @p5, [track] = @p6 WHERE (([id] = @p7))"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p1", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "path", global::System.Data.DataRowVersion.Current, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p2", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "artist", global::System.Data.DataRowVersion.Current, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p3", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "title", global::System.Data.DataRowVersion.Current, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p4", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "album", global::System.Data.DataRowVersion.Current, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p5", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "length", global::System.Data.DataRowVersion.Current, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p6", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "track", global::System.Data.DataRowVersion.Current, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlServerCe.SqlCeParameter("@p7", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, true, 0, 0, "id", global::System.Data.DataRowVersion.Original, null)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private void InitConnection() { + this._connection = new global::System.Data.SqlServerCe.SqlCeConnection(); + this._connection.ConnectionString = global::CUEPlayer.Properties.Settings.Default.CUEPlayerConnectionString; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private void InitCommandCollection() { + this._commandCollection = new global::System.Data.SqlServerCe.SqlCeCommand[1]; + this._commandCollection[0] = new global::System.Data.SqlServerCe.SqlCeCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT [id], [path], [artist], [title], [album], [length], [track] FROM [Playlist" + + "]"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)] + public virtual int Fill(DataSet1.PlaylistDataTable dataTable) { + this.Adapter.SelectCommand = this.CommandCollection[0]; + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)] + public virtual DataSet1.PlaylistDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + DataSet1.PlaylistDataTable dataTable = new DataSet1.PlaylistDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DataSet1.PlaylistDataTable dataTable) { + return this.Adapter.Update(dataTable); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(DataSet1 dataSet) { + return this.Adapter.Update(dataSet, "Playlist"); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow dataRow) { + return this.Adapter.Update(new global::System.Data.DataRow[] { + dataRow}); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + public virtual int Update(global::System.Data.DataRow[] dataRows) { + return this.Adapter.Update(dataRows); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] + public virtual int Delete(int p1) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(p1)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(string p1, string p2, string p3, string p4, global::System.Nullable p5, global::System.Nullable p6) { + if ((p1 == null)) { + throw new global::System.ArgumentNullException("p1"); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(p1)); + } + if ((p2 == null)) { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = ((string)(p2)); + } + if ((p3 == null)) { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = ((string)(p3)); + } + if ((p4 == null)) { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = ((string)(p4)); + } + if ((p5.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((int)(p5.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((p6.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[5].Value = ((int)(p6.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string p1, string p2, string p3, string p4, global::System.Nullable p5, global::System.Nullable p6, int p7) { + if ((p1 == null)) { + throw new global::System.ArgumentNullException("p1"); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(p1)); + } + if ((p2 == null)) { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(p2)); + } + if ((p3 == null)) { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(p3)); + } + if ((p4 == null)) { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(p4)); + } + if ((p5.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(p5.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((p6.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(p6.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(p7)); + global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; + if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.UpdateCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.UpdateCommand.Connection.Close(); + } + } + } + } + + /// + ///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + [global::System.ComponentModel.DesignerCategoryAttribute("code")] + [global::System.ComponentModel.ToolboxItem(true)] + [global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" + + "esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")] + public partial class TableAdapterManager : global::System.ComponentModel.Component { + + private UpdateOrderOption _updateOrder; + + private PlaylistTableAdapter _playlistTableAdapter; + + private bool _backupDataSetBeforeUpdate; + + private global::System.Data.IDbConnection _connection; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public UpdateOrderOption UpdateOrder { + get { + return this._updateOrder; + } + set { + this._updateOrder = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" + + "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" + + "", "System.Drawing.Design.UITypeEditor")] + public PlaylistTableAdapter PlaylistTableAdapter { + get { + return this._playlistTableAdapter; + } + set { + this._playlistTableAdapter = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public bool BackupDataSetBeforeUpdate { + get { + return this._backupDataSetBeforeUpdate; + } + set { + this._backupDataSetBeforeUpdate = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Browsable(false)] + public global::System.Data.IDbConnection Connection { + get { + if ((this._connection != null)) { + return this._connection; + } + if (((this._playlistTableAdapter != null) + && (this._playlistTableAdapter.Connection != null))) { + return this._playlistTableAdapter.Connection; + } + return null; + } + set { + this._connection = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.ComponentModel.Browsable(false)] + public int TableAdapterInstanceCount { + get { + int count = 0; + if ((this._playlistTableAdapter != null)) { + count = (count + 1); + } + return count; + } + } + + /// + ///Update rows in top-down order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private int UpdateUpdatedRows(DataSet1 dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) { + int result = 0; + if ((this._playlistTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Playlist.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._playlistTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + return result; + } + + /// + ///Insert rows in top-down order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private int UpdateInsertedRows(DataSet1 dataSet, global::System.Collections.Generic.List allAddedRows) { + int result = 0; + if ((this._playlistTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Playlist.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._playlistTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + return result; + } + + /// + ///Delete rows in bottom-up order. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private int UpdateDeletedRows(DataSet1 dataSet, global::System.Collections.Generic.List allChangedRows) { + int result = 0; + if ((this._playlistTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Playlist.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._playlistTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + return result; + } + + /// + ///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List allAddedRows) { + if (((updatedRows == null) + || (updatedRows.Length < 1))) { + return updatedRows; + } + if (((allAddedRows == null) + || (allAddedRows.Count < 1))) { + return updatedRows; + } + global::System.Collections.Generic.List realUpdatedRows = new global::System.Collections.Generic.List(); + for (int i = 0; (i < updatedRows.Length); i = (i + 1)) { + global::System.Data.DataRow row = updatedRows[i]; + if ((allAddedRows.Contains(row) == false)) { + realUpdatedRows.Add(row); + } + } + return realUpdatedRows.ToArray(); + } + + /// + ///Update all changes to the dataset. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public virtual int UpdateAll(DataSet1 dataSet) { + if ((dataSet == null)) { + throw new global::System.ArgumentNullException("dataSet"); + } + if ((dataSet.HasChanges() == false)) { + return 0; + } + if (((this._playlistTableAdapter != null) + && (this.MatchTableAdapterConnection(this._playlistTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + global::System.Data.IDbConnection workConnection = this.Connection; + if ((workConnection == null)) { + throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" + + "ger TableAdapter property to a valid TableAdapter instance."); + } + bool workConnOpened = false; + if (((workConnection.State & global::System.Data.ConnectionState.Broken) + == global::System.Data.ConnectionState.Broken)) { + workConnection.Close(); + } + if ((workConnection.State == global::System.Data.ConnectionState.Closed)) { + workConnection.Open(); + workConnOpened = true; + } + global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction(); + if ((workTransaction == null)) { + throw new global::System.ApplicationException("The transaction cannot begin. The current data connection does not support transa" + + "ctions or the current state is not allowing the transaction to begin."); + } + global::System.Collections.Generic.List allChangedRows = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List allAddedRows = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.List adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List(); + global::System.Collections.Generic.Dictionary revertConnections = new global::System.Collections.Generic.Dictionary(); + int result = 0; + global::System.Data.DataSet backupDataSet = null; + if (this.BackupDataSetBeforeUpdate) { + backupDataSet = new global::System.Data.DataSet(); + backupDataSet.Merge(dataSet); + } + try { + // ---- Prepare for update ----------- + // + if ((this._playlistTableAdapter != null)) { + revertConnections.Add(this._playlistTableAdapter, this._playlistTableAdapter.Connection); + this._playlistTableAdapter.Connection = ((global::System.Data.SqlServerCe.SqlCeConnection)(workConnection)); + this._playlistTableAdapter.Transaction = ((global::System.Data.SqlServerCe.SqlCeTransaction)(workTransaction)); + if (this._playlistTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._playlistTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._playlistTableAdapter.Adapter); + } + } + // + //---- Perform updates ----------- + // + if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) { + result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); + result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); + } + else { + result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); + result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); + } + result = (result + this.UpdateDeletedRows(dataSet, allChangedRows)); + // + //---- Commit updates ----------- + // + workTransaction.Commit(); + if ((0 < allAddedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; + allAddedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + } + } + if ((0 < allChangedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count]; + allChangedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + } + } + } + catch (global::System.Exception ex) { + workTransaction.Rollback(); + // ---- Restore the dataset ----------- + if (this.BackupDataSetBeforeUpdate) { + global::System.Diagnostics.Debug.Assert((backupDataSet != null)); + dataSet.Clear(); + dataSet.Merge(backupDataSet); + } + else { + if ((0 < allAddedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; + allAddedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + row.SetAdded(); + } + } + } + throw ex; + } + finally { + if (workConnOpened) { + workConnection.Close(); + } + if ((this._playlistTableAdapter != null)) { + this._playlistTableAdapter.Connection = ((global::System.Data.SqlServerCe.SqlCeConnection)(revertConnections[this._playlistTableAdapter])); + this._playlistTableAdapter.Transaction = null; + } + if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { + global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; + adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); + for (int i = 0; (i < adapters.Length); i = (i + 1)) { + global::System.Data.Common.DataAdapter adapter = adapters[i]; + adapter.AcceptChangesDuringUpdate = true; + } + } + } + return result; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) { + global::System.Array.Sort(rows, new SelfReferenceComparer(relation, childFirst)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) { + if ((this._connection != null)) { + return true; + } + if (((this.Connection == null) + || (inputConnection == null))) { + return true; + } + if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) { + return true; + } + return false; + } + + /// + ///Update Order Option + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + public enum UpdateOrderOption { + + InsertUpdateDelete = 0, + + UpdateInsertDelete = 1, + } + + /// + ///Used to sort self-referenced table's rows + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")] + private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer { + + private global::System.Data.DataRelation _relation; + + private int _childFirst; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) { + this._relation = relation; + if (childFirst) { + this._childFirst = -1; + } + else { + this._childFirst = 1; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + private bool IsChildAndParent(global::System.Data.DataRow child, global::System.Data.DataRow parent) { + global::System.Diagnostics.Debug.Assert((child != null)); + global::System.Diagnostics.Debug.Assert((parent != null)); + global::System.Data.DataRow newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); + for ( + ; ((newParent != null) + && ((object.ReferenceEquals(newParent, child) == false) + && (object.ReferenceEquals(newParent, parent) == false))); + ) { + newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); + } + if ((newParent == null)) { + for (newParent = child.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); ((newParent != null) + && ((object.ReferenceEquals(newParent, child) == false) + && (object.ReferenceEquals(newParent, parent) == false))); + ) { + newParent = newParent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); + } + } + if (object.ReferenceEquals(newParent, parent)) { + return true; + } + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) { + if (object.ReferenceEquals(row1, row2)) { + return 0; + } + if ((row1 == null)) { + return -1; + } + if ((row2 == null)) { + return 1; + } + + // Is row1 the child or grandchild of row2 + if (this.IsChildAndParent(row1, row2)) { + return this._childFirst; + } + + // Is row2 the child or grandchild of row1 + if (this.IsChildAndParent(row2, row1)) { + return (-1 * this._childFirst); + } + return 0; + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/CUEPlayer/DataSet1.cs b/CUEPlayer/DataSet1.cs new file mode 100644 index 0000000..cbf14c2 --- /dev/null +++ b/CUEPlayer/DataSet1.cs @@ -0,0 +1,9 @@ +namespace CUEPlayer { + + + public partial class DataSet1 { + partial class PlaylistDataTable + { + } + } +} diff --git a/CUEPlayer/DataSet1.xsc b/CUEPlayer/DataSet1.xsc new file mode 100644 index 0000000..551fc56 --- /dev/null +++ b/CUEPlayer/DataSet1.xsc @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/CUEPlayer/DataSet1.xsd b/CUEPlayer/DataSet1.xsd new file mode 100644 index 0000000..ec8a857 --- /dev/null +++ b/CUEPlayer/DataSet1.xsd @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + DELETE FROM [Playlist] WHERE (([id] = @p1)) + + + + + + + + INSERT INTO [Playlist] ([path], [artist], [title], [album], [length], [track]) VALUES (@p1, @p2, @p3, @p4, @p5, @p6) + + + + + + + + + + + + + SELECT [id], [path], [artist], [title], [album], [length], [track] FROM [Playlist] + + + + + + UPDATE [Playlist] SET [path] = @p1, [artist] = @p2, [title] = @p3, [album] = @p4, [length] = @p5, [track] = @p6 WHERE (([id] = @p7)) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CUEPlayer/DataSet1.xss b/CUEPlayer/DataSet1.xss new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/CUEPlayer/DataSet1.xss @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/CUEPlayer/Deck.Designer.cs b/CUEPlayer/Deck.Designer.cs new file mode 100644 index 0000000..ca284d4 --- /dev/null +++ b/CUEPlayer/Deck.Designer.cs @@ -0,0 +1,290 @@ +namespace CUEPlayer +{ + partial class Deck + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.textBoxArtist = new System.Windows.Forms.TextBox(); + this.textBoxAlbum = new System.Windows.Forms.TextBox(); + this.textBoxTitle = new System.Windows.Forms.TextBox(); + this.textBoxDuration = new System.Windows.Forms.TextBox(); + this.pictureBox = new System.Windows.Forms.PictureBox(); + this.buttonPlay = new System.Windows.Forms.Button(); + this.buttonStop = new System.Windows.Forms.Button(); + this.mediaSlider = new MediaSlider.MediaSlider(); + this.buttonPause = new System.Windows.Forms.Button(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.mediaSliderVolume = new MediaSlider.MediaSlider(); + this.buttonRewind = new System.Windows.Forms.Button(); + this.buttonNext = new System.Windows.Forms.Button(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); + this.SuspendLayout(); + // + // textBoxArtist + // + this.textBoxArtist.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.textBoxArtist.Location = new System.Drawing.Point(130, 12); + this.textBoxArtist.Name = "textBoxArtist"; + this.textBoxArtist.ReadOnly = true; + this.textBoxArtist.Size = new System.Drawing.Size(203, 13); + this.textBoxArtist.TabIndex = 10; + // + // textBoxAlbum + // + this.textBoxAlbum.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.textBoxAlbum.Location = new System.Drawing.Point(130, 31); + this.textBoxAlbum.Name = "textBoxAlbum"; + this.textBoxAlbum.ReadOnly = true; + this.textBoxAlbum.Size = new System.Drawing.Size(203, 13); + this.textBoxAlbum.TabIndex = 11; + // + // textBoxTitle + // + this.textBoxTitle.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.textBoxTitle.Location = new System.Drawing.Point(130, 50); + this.textBoxTitle.Name = "textBoxTitle"; + this.textBoxTitle.ReadOnly = true; + this.textBoxTitle.Size = new System.Drawing.Size(203, 13); + this.textBoxTitle.TabIndex = 12; + // + // textBoxDuration + // + this.textBoxDuration.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.textBoxDuration.Location = new System.Drawing.Point(130, 69); + this.textBoxDuration.Name = "textBoxDuration"; + this.textBoxDuration.ReadOnly = true; + this.textBoxDuration.Size = new System.Drawing.Size(123, 13); + this.textBoxDuration.TabIndex = 13; + // + // pictureBox + // + this.pictureBox.ErrorImage = global::CUEPlayer.Properties.Resources.ctdb; + this.pictureBox.Image = global::CUEPlayer.Properties.Resources.ctdb; + this.pictureBox.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.pictureBox.InitialImage = global::CUEPlayer.Properties.Resources.ctdb; + this.pictureBox.Location = new System.Drawing.Point(12, 12); + this.pictureBox.Name = "pictureBox"; + this.pictureBox.Size = new System.Drawing.Size(100, 100); + this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox.TabIndex = 16; + this.pictureBox.TabStop = false; + // + // buttonPlay + // + this.buttonPlay.BackColor = System.Drawing.Color.Transparent; + this.buttonPlay.BackgroundImage = global::CUEPlayer.Properties.Resources.control_play_blue; + this.buttonPlay.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.buttonPlay.FlatAppearance.BorderSize = 0; + this.buttonPlay.Location = new System.Drawing.Point(206, 87); + this.buttonPlay.Name = "buttonPlay"; + this.buttonPlay.Size = new System.Drawing.Size(25, 25); + this.buttonPlay.TabIndex = 4; + this.buttonPlay.UseVisualStyleBackColor = false; + this.buttonPlay.Click += new System.EventHandler(this.buttonPlay_Click); + // + // buttonStop + // + this.buttonStop.Image = global::CUEPlayer.Properties.Resources.control_stop_blue; + this.buttonStop.Location = new System.Drawing.Point(231, 87); + this.buttonStop.Name = "buttonStop"; + this.buttonStop.Size = new System.Drawing.Size(25, 25); + this.buttonStop.TabIndex = 9; + this.buttonStop.UseVisualStyleBackColor = true; + this.buttonStop.Click += new System.EventHandler(this.buttonStop_Click); + // + // mediaSlider + // + this.mediaSlider.Animated = false; + this.mediaSlider.AnimationSize = 0.2F; + this.mediaSlider.AnimationSpeed = MediaSlider.MediaSlider.AnimateSpeed.Normal; + this.mediaSlider.AutoScrollMargin = new System.Drawing.Size(0, 0); + this.mediaSlider.AutoScrollMinSize = new System.Drawing.Size(0, 0); + this.mediaSlider.BackColor = System.Drawing.SystemColors.Control; + this.mediaSlider.BackgroundImage = null; + this.mediaSlider.ButtonAccentColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.mediaSlider.ButtonBorderColor = System.Drawing.Color.Black; + this.mediaSlider.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(160)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.mediaSlider.ButtonCornerRadius = ((uint)(4u)); + this.mediaSlider.ButtonSize = new System.Drawing.Size(10, 20); + this.mediaSlider.ButtonStyle = MediaSlider.MediaSlider.ButtonType.GlassOverlap; + this.mediaSlider.ContextMenuStrip = null; + this.mediaSlider.LargeChange = 2; + this.mediaSlider.Location = new System.Drawing.Point(0, 115); + this.mediaSlider.Margin = new System.Windows.Forms.Padding(0); + this.mediaSlider.Maximum = 1; + this.mediaSlider.Minimum = 0; + this.mediaSlider.Name = "mediaSlider"; + this.mediaSlider.Orientation = System.Windows.Forms.Orientation.Horizontal; + this.mediaSlider.ShowButtonOnHover = true; + this.mediaSlider.Size = new System.Drawing.Size(362, 25); + this.mediaSlider.SliderFlyOut = MediaSlider.MediaSlider.FlyOutStyle.None; + this.mediaSlider.SmallChange = 1; + this.mediaSlider.SmoothScrolling = true; + this.mediaSlider.TabIndex = 9; + this.mediaSlider.TickColor = System.Drawing.Color.DarkGray; + this.mediaSlider.TickStyle = System.Windows.Forms.TickStyle.None; + this.mediaSlider.TickType = MediaSlider.MediaSlider.TickMode.Standard; + this.mediaSlider.TrackBorderColor = System.Drawing.SystemColors.ButtonShadow; + this.mediaSlider.TrackDepth = 9; + this.mediaSlider.TrackFillColor = System.Drawing.SystemColors.ButtonFace; + this.mediaSlider.TrackProgressColor = System.Drawing.Color.FromArgb(((int)(((byte)(5)))), ((int)(((byte)(101)))), ((int)(((byte)(188))))); + this.mediaSlider.TrackShadow = true; + this.mediaSlider.TrackShadowColor = System.Drawing.SystemColors.ButtonShadow; + this.mediaSlider.TrackStyle = MediaSlider.MediaSlider.TrackType.Progress; + this.mediaSlider.Value = 0; + this.mediaSlider.ValueChanged += new System.EventHandler(this.mediaSliderA_ValueChanged); + this.mediaSlider.Scrolled += new System.EventHandler(this.mediaSlider_Scrolled); + // + // buttonPause + // + this.buttonPause.Image = global::CUEPlayer.Properties.Resources.control_pause_blue; + this.buttonPause.Location = new System.Drawing.Point(256, 87); + this.buttonPause.Name = "buttonPause"; + this.buttonPause.Size = new System.Drawing.Size(25, 25); + this.buttonPause.TabIndex = 17; + this.buttonPause.UseVisualStyleBackColor = true; + this.buttonPause.Click += new System.EventHandler(this.buttonPause_Click); + // + // timer1 + // + this.timer1.Enabled = true; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // mediaSliderVolume + // + this.mediaSliderVolume.Animated = false; + this.mediaSliderVolume.AnimationSize = 0.2F; + this.mediaSliderVolume.AnimationSpeed = MediaSlider.MediaSlider.AnimateSpeed.Normal; + this.mediaSliderVolume.AutoScrollMargin = new System.Drawing.Size(0, 0); + this.mediaSliderVolume.AutoScrollMinSize = new System.Drawing.Size(0, 0); + this.mediaSliderVolume.BackColor = System.Drawing.SystemColors.Control; + this.mediaSliderVolume.BackgroundImage = null; + this.mediaSliderVolume.ButtonAccentColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.mediaSliderVolume.ButtonBorderColor = System.Drawing.Color.Black; + this.mediaSliderVolume.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(160)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.mediaSliderVolume.ButtonCornerRadius = ((uint)(4u)); + this.mediaSliderVolume.ButtonSize = new System.Drawing.Size(14, 14); + this.mediaSliderVolume.ButtonStyle = MediaSlider.MediaSlider.ButtonType.GlassOverlap; + this.mediaSliderVolume.ContextMenuStrip = null; + this.mediaSliderVolume.LargeChange = 5; + this.mediaSliderVolume.Location = new System.Drawing.Point(336, 12); + this.mediaSliderVolume.Margin = new System.Windows.Forms.Padding(0); + this.mediaSliderVolume.Maximum = 100; + this.mediaSliderVolume.Minimum = 0; + this.mediaSliderVolume.Name = "mediaSliderVolume"; + this.mediaSliderVolume.Orientation = System.Windows.Forms.Orientation.Vertical; + this.mediaSliderVolume.ShowButtonOnHover = false; + this.mediaSliderVolume.Size = new System.Drawing.Size(26, 100); + this.mediaSliderVolume.SliderFlyOut = MediaSlider.MediaSlider.FlyOutStyle.None; + this.mediaSliderVolume.SmallChange = 1; + this.mediaSliderVolume.SmoothScrolling = true; + this.mediaSliderVolume.TabIndex = 18; + this.mediaSliderVolume.TickColor = System.Drawing.Color.DarkGray; + this.mediaSliderVolume.TickStyle = System.Windows.Forms.TickStyle.None; + this.mediaSliderVolume.TickType = MediaSlider.MediaSlider.TickMode.Standard; + this.mediaSliderVolume.TrackBorderColor = System.Drawing.SystemColors.ActiveBorder; + this.mediaSliderVolume.TrackDepth = 6; + this.mediaSliderVolume.TrackFillColor = System.Drawing.SystemColors.ActiveBorder; + this.mediaSliderVolume.TrackProgressColor = System.Drawing.Color.Green; + this.mediaSliderVolume.TrackShadow = true; + this.mediaSliderVolume.TrackShadowColor = System.Drawing.SystemColors.ScrollBar; + this.mediaSliderVolume.TrackStyle = MediaSlider.MediaSlider.TrackType.Progress; + this.mediaSliderVolume.Value = 100; + this.mediaSliderVolume.Scrolled += new System.EventHandler(this.mediaSliderVolume_Scrolled); + // + // buttonRewind + // + this.buttonRewind.Image = global::CUEPlayer.Properties.Resources.control_rewind_blue; + this.buttonRewind.Location = new System.Drawing.Point(281, 87); + this.buttonRewind.Name = "buttonRewind"; + this.buttonRewind.Size = new System.Drawing.Size(25, 25); + this.buttonRewind.TabIndex = 19; + this.buttonRewind.UseVisualStyleBackColor = true; + this.buttonRewind.Click += new System.EventHandler(this.buttonRewind_Click); + // + // buttonNext + // + this.buttonNext.Image = global::CUEPlayer.Properties.Resources.control_end_blue; + this.buttonNext.Location = new System.Drawing.Point(306, 87); + this.buttonNext.Name = "buttonNext"; + this.buttonNext.Size = new System.Drawing.Size(25, 25); + this.buttonNext.TabIndex = 20; + this.buttonNext.UseVisualStyleBackColor = true; + this.buttonNext.Click += new System.EventHandler(this.buttonNext_Click); + // + // Deck + // + this.AllowDrop = true; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(361, 145); + this.ControlBox = false; + this.Controls.Add(this.buttonNext); + this.Controls.Add(this.buttonRewind); + this.Controls.Add(this.mediaSliderVolume); + this.Controls.Add(this.buttonPause); + this.Controls.Add(this.mediaSlider); + this.Controls.Add(this.pictureBox); + this.Controls.Add(this.textBoxDuration); + this.Controls.Add(this.buttonPlay); + this.Controls.Add(this.textBoxTitle); + this.Controls.Add(this.buttonStop); + this.Controls.Add(this.textBoxAlbum); + this.Controls.Add(this.textBoxArtist); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "Deck"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.Text = "Deck"; + this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Deck_DragDrop); + this.DragOver += new System.Windows.Forms.DragEventHandler(this.Deck_DragOver); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button buttonPlay; + private System.Windows.Forms.Button buttonStop; + private System.Windows.Forms.TextBox textBoxArtist; + private System.Windows.Forms.TextBox textBoxAlbum; + private System.Windows.Forms.TextBox textBoxTitle; + private System.Windows.Forms.TextBox textBoxDuration; + private System.Windows.Forms.PictureBox pictureBox; + private MediaSlider.MediaSlider mediaSlider; + private System.Windows.Forms.Button buttonPause; + private System.Windows.Forms.Timer timer1; + private MediaSlider.MediaSlider mediaSliderVolume; + private System.Windows.Forms.Button buttonRewind; + private System.Windows.Forms.Button buttonNext; + + } +} \ No newline at end of file diff --git a/CUEPlayer/Deck.cs b/CUEPlayer/Deck.cs new file mode 100644 index 0000000..d654ab3 --- /dev/null +++ b/CUEPlayer/Deck.cs @@ -0,0 +1,317 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Threading; +using System.Windows.Forms; +using CUETools.Codecs; +using CUETools.Processor; +using CUETools.DSP.Mixer; + +namespace CUEPlayer +{ + public partial class Deck : Form + { + IAudioSource playingSource = null; + CUESheet playingCue = null; + int playingRow = -1; + long playingStart = 0; + long playingFinish = 0; + Thread playThread; + int iSource; + MixingSource mixer; + MixingWriter writer; + Deck nextDeck; + bool needUpdate = false; + + public Deck(int iSource, string suffix) + { + InitializeComponent(); + this.iSource = iSource; + if (suffix != null) + Text += " " + suffix; + //mediaSliderA.FlyOutInfo += new MediaSlider.MediaSlider.FlyOutInfoDelegate(mediaSliderA_FlyOutInfo); + } + + public void Init(frmCUEPlayer parent, Deck nextDeck) + { + MdiParent = parent; + mixer = (parent as frmCUEPlayer).Mixer; + writer = new MixingWriter(mixer, iSource); + this.nextDeck = nextDeck; + Show(); + } + + //void mediaSliderA_FlyOutInfo(ref string data) + //{ + // TimeSpan ts = TimeSpan.FromSeconds(mediaSliderA.Value / 44100.0); + // data = ts.ToString(); + //} + + internal int PlayingOffset + { + set + { + if (!mediaSlider.Capture) mediaSlider.Value = value; + } + } + + internal void UpdateDeck() + { + if (needUpdate) + { + needUpdate = false; + + DataSet1 dataSet = (MdiParent as frmCUEPlayer).DataSet; + + mediaSlider.Maximum = (int)(playingFinish - playingStart); + mediaSlider.Value = 0; + textBoxArtist.Text = playingRow < 0 ? "" : dataSet.Playlist[playingRow].artist; + textBoxAlbum.Text = playingRow < 0 ? "" : dataSet.Playlist[playingRow].album; + textBoxTitle.Text = playingRow < 0 ? "" : dataSet.Playlist[playingRow].title; + textBoxDuration.Text = ""; + pictureBox.Image = playingCue != null ? playingCue.Cover : pictureBox.InitialImage; + + if (nextDeck != null && nextDeck.playingSource == null && playingRow >= 0 && playingRow < dataSet.Playlist.Rows.Count - 1) + { + nextDeck.LoadDeck(playingRow + 1); + } + } + mediaSlider.Enabled = playingSource != null; + if (playingSource != null) + mediaSlider.Value = (int)(playingSource.Position - playingStart); + } + + private void mediaSliderA_ValueChanged(object sender, EventArgs e) + { + if (mediaSlider.Maximum == 1) return; + TimeSpan len1 = TimeSpan.FromSeconds(mediaSlider.Maximum / 44100.0); + TimeSpan len2 = TimeSpan.FromSeconds(mediaSlider.Value / 44100.0); + string lenStr1 = string.Format("{0:d}.{1:d2}:{2:d2}:{3:d2}", len1.Days, len1.Hours, len1.Minutes, len1.Seconds).TrimStart('0', ':', '.'); + string lenStr2 = string.Format("{0:d}.{1:d2}:{2:d2}:{3:d2}", len2.Days, len2.Hours, len2.Minutes, len2.Seconds).TrimStart('0', ':', '.'); + lenStr1 = "0:00".Substring(0, Math.Max(0, 4 - lenStr1.Length)) + lenStr1; + lenStr2 = "0:00".Substring(0, Math.Max(0, 4 - lenStr2.Length)) + lenStr2; + textBoxDuration.Text = lenStr2 + " / " + lenStr1; + } + + private int seekTo = -1; + private bool stopNow = false; + + private void PlayThread() + { + AudioBuffer buff = new AudioBuffer(playingSource.PCM, 0x2000); + + try + { + do + { + if (playingSource == null) + writer.Pause(); + else + { + if (seekTo >= 0 && playingStart + seekTo < playingFinish) + { + playingSource.Position = playingStart + seekTo; + seekTo = -1; + } + if (playingSource.Position == playingFinish || stopNow || seekTo == (int)(playingFinish - playingStart)) + { + seekTo = -1; + playingSource.Close(); + playingSource = null; + if (playingCue != null) + { + playingCue.Close(); + playingCue = null; + } + playingFinish = 0; + playingStart = 0; + playingRow = -1; + if (stopNow || nextDeck == null || nextDeck.playingSource == null) + { + writer.Flush(); + stopNow = false; + mixer.BufferPlaying(iSource, false); + needUpdate = true; + playThread = null; + return; + } + playingSource = nextDeck.playingSource; + playingCue = nextDeck.playingCue; + playingStart = nextDeck.playingStart; + playingFinish = nextDeck.playingFinish; + playingRow = nextDeck.playingRow; + needUpdate = true; + nextDeck.playingSource = null; + nextDeck.playingCue = null; + nextDeck.playingStart = 0; + nextDeck.playingFinish = 0; + nextDeck.playingRow = -1; + nextDeck.needUpdate = true; + } + playingSource.Read(buff, Math.Min(buff.Size, (int)(playingFinish - playingSource.Position))); + writer.Write(buff); + } + } while (true); + } + catch (Exception ex) + { + } + if (playingCue != null) + { + playingCue.Close(); + playingCue = null; + } + if (playingSource != null) + { + playingSource.Close(); + playingSource = null; + } + playThread = null; + } + + internal void LoadDeck(int row) + { + CUEConfig _config = (MdiParent as frmCUEPlayer).Config; + DataSet1 dataSet = (MdiParent as frmCUEPlayer).DataSet; + Playlist playlist = (MdiParent as frmCUEPlayer).wndPlaylist; + string path = dataSet.Playlist[row].path; + int track = dataSet.Playlist[row].track; + + try + { + playingCue = new CUESheet(_config); + playingCue.Open(path); + playingSource = new CUESheetAudio(playingCue); + playingSource.Position = (long)playingCue.TOC[track].Start * 588; + playingSource = new AudioPipe(playingSource, 0x2000); + playingStart = playingSource.Position; + playingFinish = playingStart + (long)playingCue.TOC[track].Length * 588; + playingRow = row; + //playlist.List.Items[playingRow].BackColor = Color.AliceBlue; + needUpdate = true; + UpdateDeck(); + } + catch (Exception ex) + { + playingStart = playingFinish = 0; + playingCue = null; + playingSource = null; + return; + } + } + + private void buttonPlay_Click(object sender, EventArgs e) + { + if (playingSource == null) + { + Playlist playlist = (MdiParent as frmCUEPlayer).wndPlaylist; + LoadDeck(playlist.List.SelectedIndices[0]); + } + mixer.BufferPlaying(iSource, true); + if (playThread == null) + { + playThread = new Thread(PlayThread); + playThread.Priority = ThreadPriority.AboveNormal; + playThread.IsBackground = true; + playThread.Name = Text; + playThread.Start(); + } + } + + private void buttonStop_Click(object sender, EventArgs e) + { + if (playThread != null) + { + stopNow = true; + playThread.Join(); + } + else + { + if (playingSource != null) + { + playingSource.Close(); + playingSource = null; + } + if (playingCue != null) + { + playingCue.Close(); + playingCue = null; + } + playingFinish = 0; + playingStart = 0; + playingRow = -1; + needUpdate = true; + UpdateDeck(); + } + } + + private void buttonPause_Click(object sender, EventArgs e) + { + mixer.BufferPlaying(iSource, false); + } + + private void timer1_Tick(object sender, EventArgs e) + { + UpdateDeck(); + } + + private void mediaSlider_Scrolled(object sender, EventArgs e) + { + if (playThread != null) + { + seekTo = mediaSlider.Value; + } + else + { + if (playingSource != null) + playingSource.Position = playingStart + mediaSlider.Value; + } + } + + private void mediaSliderVolume_Scrolled(object sender, EventArgs e) + { + writer.Volume = mediaSliderVolume.Value / 100.0f; + } + + private void Deck_DragOver(object sender, DragEventArgs e) + { + if (e.Data.GetDataPresent(DataFormats.Serializable)) + { + e.Effect = DragDropEffects.Copy; + } + } + + private void Deck_DragDrop(object sender, DragEventArgs e) + { + if (e.Data.GetDataPresent(DataFormats.Serializable)) + { + ListView.SelectedIndexCollection indexes = + e.Data.GetData(DataFormats.Serializable) as ListView.SelectedIndexCollection; + if (playThread == null && indexes != null) + { + LoadDeck(indexes[0]); + } + } + } + + private void buttonNext_Click(object sender, EventArgs e) + { + seekTo = (int)(playingFinish - playingStart); + } + + private void buttonRewind_Click(object sender, EventArgs e) + { + if (playThread != null) + { + seekTo = 0; + } + else if (playingSource != null) + { + playingSource.Position = playingStart; + } + } + } +} diff --git a/CUEPlayer/Deck.resx b/CUEPlayer/Deck.resx new file mode 100644 index 0000000..93f75a9 --- /dev/null +++ b/CUEPlayer/Deck.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/CUEPlayer/Output.Designer.cs b/CUEPlayer/Output.Designer.cs new file mode 100644 index 0000000..6d82c7a --- /dev/null +++ b/CUEPlayer/Output.Designer.cs @@ -0,0 +1,171 @@ +namespace CUEPlayer +{ + partial class Output + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.mediaSliderVolume = new MediaSlider.MediaSlider(); + this.peakMeterCtrl1 = new Ernzo.WinForms.Controls.PeakMeterCtrl(); + this.buttonPause = new System.Windows.Forms.Button(); + this.buttonPlay = new System.Windows.Forms.Button(); + this.buttonStop = new System.Windows.Forms.Button(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.SuspendLayout(); + // + // mediaSliderVolume + // + this.mediaSliderVolume.Animated = false; + this.mediaSliderVolume.AnimationSize = 0.2F; + this.mediaSliderVolume.AnimationSpeed = MediaSlider.MediaSlider.AnimateSpeed.Normal; + this.mediaSliderVolume.AutoScrollMargin = new System.Drawing.Size(0, 0); + this.mediaSliderVolume.AutoScrollMinSize = new System.Drawing.Size(0, 0); + this.mediaSliderVolume.BackColor = System.Drawing.SystemColors.Control; + this.mediaSliderVolume.BackgroundImage = null; + this.mediaSliderVolume.ButtonAccentColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); + this.mediaSliderVolume.ButtonBorderColor = System.Drawing.Color.Black; + this.mediaSliderVolume.ButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(160)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0))))); + this.mediaSliderVolume.ButtonCornerRadius = ((uint)(4u)); + this.mediaSliderVolume.ButtonSize = new System.Drawing.Size(14, 14); + this.mediaSliderVolume.ButtonStyle = MediaSlider.MediaSlider.ButtonType.GlassOverlap; + this.mediaSliderVolume.ContextMenuStrip = null; + this.mediaSliderVolume.LargeChange = 5; + this.mediaSliderVolume.Location = new System.Drawing.Point(9, 9); + this.mediaSliderVolume.Margin = new System.Windows.Forms.Padding(0); + this.mediaSliderVolume.Maximum = 100; + this.mediaSliderVolume.Minimum = 0; + this.mediaSliderVolume.Name = "mediaSliderVolume"; + this.mediaSliderVolume.Orientation = System.Windows.Forms.Orientation.Vertical; + this.mediaSliderVolume.ShowButtonOnHover = false; + this.mediaSliderVolume.Size = new System.Drawing.Size(37, 114); + this.mediaSliderVolume.SliderFlyOut = MediaSlider.MediaSlider.FlyOutStyle.None; + this.mediaSliderVolume.SmallChange = 1; + this.mediaSliderVolume.SmoothScrolling = true; + this.mediaSliderVolume.TabIndex = 14; + this.mediaSliderVolume.TickColor = System.Drawing.Color.DarkGray; + this.mediaSliderVolume.TickStyle = System.Windows.Forms.TickStyle.None; + this.mediaSliderVolume.TickType = MediaSlider.MediaSlider.TickMode.Standard; + this.mediaSliderVolume.TrackBorderColor = System.Drawing.SystemColors.ActiveBorder; + this.mediaSliderVolume.TrackDepth = 6; + this.mediaSliderVolume.TrackFillColor = System.Drawing.SystemColors.ActiveBorder; + this.mediaSliderVolume.TrackProgressColor = System.Drawing.Color.Green; + this.mediaSliderVolume.TrackShadow = true; + this.mediaSliderVolume.TrackShadowColor = System.Drawing.SystemColors.ScrollBar; + this.mediaSliderVolume.TrackStyle = MediaSlider.MediaSlider.TrackType.Progress; + this.mediaSliderVolume.Value = 0; + this.mediaSliderVolume.Scrolled += new System.EventHandler(this.mediaSliderVolume_Scrolled); + // + // peakMeterCtrl1 + // + this.peakMeterCtrl1.BandsCount = 2; + this.peakMeterCtrl1.ColorHigh = System.Drawing.Color.Red; + this.peakMeterCtrl1.ColorHighBack = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(150)))), ((int)(((byte)(150))))); + this.peakMeterCtrl1.ColorMedium = System.Drawing.Color.Yellow; + this.peakMeterCtrl1.ColorMediumBack = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(150))))); + this.peakMeterCtrl1.ColorNormal = System.Drawing.Color.Green; + this.peakMeterCtrl1.ColorNormalBack = System.Drawing.Color.FromArgb(((int)(((byte)(150)))), ((int)(((byte)(255)))), ((int)(((byte)(150))))); + this.peakMeterCtrl1.FalloffColor = System.Drawing.Color.Blue; + this.peakMeterCtrl1.GridColor = System.Drawing.Color.Gainsboro; + this.peakMeterCtrl1.LEDCount = 25; + this.peakMeterCtrl1.Location = new System.Drawing.Point(60, 9); + this.peakMeterCtrl1.Margin = new System.Windows.Forms.Padding(0); + this.peakMeterCtrl1.Name = "peakMeterCtrl1"; + this.peakMeterCtrl1.Size = new System.Drawing.Size(15, 109); + this.peakMeterCtrl1.TabIndex = 13; + this.peakMeterCtrl1.Text = "peakMeterCtrl1"; + // + // buttonPause + // + this.buttonPause.Image = global::CUEPlayer.Properties.Resources.control_pause_blue; + this.buttonPause.Location = new System.Drawing.Point(59, 130); + this.buttonPause.Name = "buttonPause"; + this.buttonPause.Size = new System.Drawing.Size(25, 25); + this.buttonPause.TabIndex = 12; + this.buttonPause.UseVisualStyleBackColor = true; + this.buttonPause.Click += new System.EventHandler(this.buttonPause_Click); + // + // buttonPlay + // + this.buttonPlay.BackColor = System.Drawing.Color.Transparent; + this.buttonPlay.BackgroundImage = global::CUEPlayer.Properties.Resources.control_play_blue; + this.buttonPlay.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.buttonPlay.FlatAppearance.BorderSize = 0; + this.buttonPlay.Location = new System.Drawing.Point(9, 130); + this.buttonPlay.Name = "buttonPlay"; + this.buttonPlay.Size = new System.Drawing.Size(25, 25); + this.buttonPlay.TabIndex = 10; + this.buttonPlay.UseVisualStyleBackColor = false; + this.buttonPlay.Click += new System.EventHandler(this.buttonPlay_Click); + // + // buttonStop + // + this.buttonStop.Image = global::CUEPlayer.Properties.Resources.control_stop_blue; + this.buttonStop.Location = new System.Drawing.Point(34, 130); + this.buttonStop.Name = "buttonStop"; + this.buttonStop.Size = new System.Drawing.Size(25, 25); + this.buttonStop.TabIndex = 11; + this.buttonStop.UseVisualStyleBackColor = true; + this.buttonStop.Click += new System.EventHandler(this.buttonStop_Click); + // + // timer1 + // + this.timer1.Enabled = true; + this.timer1.Interval = 50; + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // + // Output + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(96, 168); + this.ControlBox = false; + this.Controls.Add(this.mediaSliderVolume); + this.Controls.Add(this.peakMeterCtrl1); + this.Controls.Add(this.buttonPause); + this.Controls.Add(this.buttonPlay); + this.Controls.Add(this.buttonStop); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "Output"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.Text = "Output"; + this.Load += new System.EventHandler(this.Output_Load); + this.ResumeLayout(false); + + } + + #endregion + + private MediaSlider.MediaSlider mediaSliderVolume; + private Ernzo.WinForms.Controls.PeakMeterCtrl peakMeterCtrl1; + private System.Windows.Forms.Button buttonPause; + private System.Windows.Forms.Button buttonPlay; + private System.Windows.Forms.Button buttonStop; + private System.Windows.Forms.Timer timer1; + } +} \ No newline at end of file diff --git a/CUEPlayer/Output.cs b/CUEPlayer/Output.cs new file mode 100644 index 0000000..568ef47 --- /dev/null +++ b/CUEPlayer/Output.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.Diagnostics; +using NAudio.CoreAudioApi; +using CUETools.Codecs; +using CUETools.Codecs.CoreAudio; +using CUETools.Processor; + +namespace CUEPlayer +{ + public partial class Output : Form + { + private MMDevice _device; + + internal MMDevice Device + { + get + { + return _device; + } + + set + { + _device = value; + } + } + + public Output() + { + InitializeComponent(); + } + + public void Init(frmCUEPlayer parent) + { + MdiParent = parent; + _device = WasapiOut.GetDefaultAudioEndpoint(); + _device.AudioEndpointVolume.OnVolumeNotification += new AudioEndpointVolumeNotificationDelegate(AudioEndpointVolume_OnVolumeNotification); + mediaSliderVolume.Value = (int)(_device.AudioEndpointVolume.MasterVolumeLevelScalar * 100); + Show(); + } + + void AudioEndpointVolume_OnVolumeNotification(AudioVolumeNotificationData data) + { + if (data.EventContext == Guid.Empty) + return; + if (this.InvokeRequired) + this.Invoke((MethodInvoker)delegate() { AudioEndpointVolume_OnVolumeNotification(data); }); + else + mediaSliderVolume.Value = (int)(data.MasterVolume * 100); + } + + private void mediaSliderVolume_Scrolled(object sender, EventArgs e) + { + try + { + _device.AudioEndpointVolume.MasterVolumeLevelScalar = mediaSliderVolume.Value / 100.0f; + } + catch (Exception ex) + { + Trace.WriteLine(ex.Message); + } + } + + private int[] peakValues = null; + + private void timer1_Tick(object sender, EventArgs e) + { + if (_device == null) + return; + if (peakValues == null || peakValues.Length != _device.AudioMeterInformation.PeakValues.Count) + { + peakValues = new int[_device.AudioMeterInformation.PeakValues.Count]; + peakMeterCtrl1.SetMeterBands(peakValues.Length, 25); + } + for (int i = 0; i < peakValues.Length; i++) + peakValues[i] = (int)(_device.AudioMeterInformation.PeakValues[i] * 100); + //peakValues[0] = (int)(_device.AudioMeterInformation.MasterPeakValue * 100); + peakMeterCtrl1.SetData(peakValues, 0, peakValues.Length); + } + + private void buttonPlay_Click(object sender, EventArgs e) + { + (MdiParent as frmCUEPlayer).buttonPlay_Click(sender, e); + } + + private void buttonStop_Click(object sender, EventArgs e) + { + (MdiParent as frmCUEPlayer).buttonStop_Click(sender, e); + } + + private void buttonPause_Click(object sender, EventArgs e) + { + (MdiParent as frmCUEPlayer).buttonPause_Click(sender, e); + } + + private void Output_Load(object sender, EventArgs e) + { + peakMeterCtrl1.Start(50); + } + } +} diff --git a/CUEPlayer/Output.resx b/CUEPlayer/Output.resx new file mode 100644 index 0000000..93f75a9 --- /dev/null +++ b/CUEPlayer/Output.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/CUEPlayer/Playlist.Designer.cs b/CUEPlayer/Playlist.Designer.cs new file mode 100644 index 0000000..ed85e7d --- /dev/null +++ b/CUEPlayer/Playlist.Designer.cs @@ -0,0 +1,121 @@ +namespace CUEPlayer +{ + partial class Playlist + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.listViewTracks = new System.Windows.Forms.ListView(); + this.columnName = new System.Windows.Forms.ColumnHeader(); + this.columnLength = new System.Windows.Forms.ColumnHeader(); + this.contextMenuStripPlaylist = new System.Windows.Forms.ContextMenuStrip(this.components); + this.exploreToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.contextMenuStripPlaylist.SuspendLayout(); + this.SuspendLayout(); + // + // listViewTracks + // + this.listViewTracks.AllowDrop = true; + this.listViewTracks.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.listViewTracks.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnName, + this.columnLength}); + this.listViewTracks.ContextMenuStrip = this.contextMenuStripPlaylist; + this.listViewTracks.Dock = System.Windows.Forms.DockStyle.Fill; + this.listViewTracks.FullRowSelect = true; + this.listViewTracks.GridLines = true; + this.listViewTracks.Location = new System.Drawing.Point(0, 0); + this.listViewTracks.Margin = new System.Windows.Forms.Padding(0); + this.listViewTracks.Name = "listViewTracks"; + this.listViewTracks.Size = new System.Drawing.Size(372, 279); + this.listViewTracks.TabIndex = 6; + this.listViewTracks.UseCompatibleStateImageBehavior = false; + this.listViewTracks.View = System.Windows.Forms.View.Details; + this.listViewTracks.DragDrop += new System.Windows.Forms.DragEventHandler(this.listViewTracks_DragDrop); + this.listViewTracks.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listViewTracks_KeyDown); + this.listViewTracks.ItemDrag += new System.Windows.Forms.ItemDragEventHandler(this.listViewTracks_ItemDrag); + this.listViewTracks.DragOver += new System.Windows.Forms.DragEventHandler(this.listViewTracks_DragOver); + // + // columnName + // + this.columnName.Text = "Name"; + this.columnName.Width = 256; + // + // columnLength + // + this.columnLength.Text = "Length"; + this.columnLength.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; + this.columnLength.Width = 80; + // + // contextMenuStripPlaylist + // + this.contextMenuStripPlaylist.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.exploreToolStripMenuItem, + this.removeToolStripMenuItem}); + this.contextMenuStripPlaylist.Name = "contextMenuStripPlaylist"; + this.contextMenuStripPlaylist.Size = new System.Drawing.Size(118, 48); + // + // exploreToolStripMenuItem + // + this.exploreToolStripMenuItem.Name = "exploreToolStripMenuItem"; + this.exploreToolStripMenuItem.Size = new System.Drawing.Size(117, 22); + this.exploreToolStripMenuItem.Text = "Explore"; + this.exploreToolStripMenuItem.Click += new System.EventHandler(this.exploreToolStripMenuItem_Click); + // + // removeToolStripMenuItem + // + this.removeToolStripMenuItem.Name = "removeToolStripMenuItem"; + this.removeToolStripMenuItem.Size = new System.Drawing.Size(117, 22); + this.removeToolStripMenuItem.Text = "Remove"; + this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click); + // + // Playlist + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(372, 279); + this.ControlBox = false; + this.Controls.Add(this.listViewTracks); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; + this.Name = "Playlist"; + this.Text = "Playlist"; + this.contextMenuStripPlaylist.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListView listViewTracks; + private System.Windows.Forms.ColumnHeader columnName; + private System.Windows.Forms.ColumnHeader columnLength; + private System.Windows.Forms.ContextMenuStrip contextMenuStripPlaylist; + private System.Windows.Forms.ToolStripMenuItem exploreToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem; + } +} \ No newline at end of file diff --git a/CUEPlayer/Playlist.cs b/CUEPlayer/Playlist.cs new file mode 100644 index 0000000..fe3b888 --- /dev/null +++ b/CUEPlayer/Playlist.cs @@ -0,0 +1,165 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.IO; +using System.Diagnostics; +using System.Windows.Forms; +using CUEControls; +using CUETools.Codecs; +using CUETools.Processor; + +namespace CUEPlayer +{ + public partial class Playlist : Form + { + private CUEConfig _config; + private ShellIconMgr _icon_mgr; + private DataSet1 dataSet; + + public Playlist() + { + InitializeComponent(); + } + + public void Init(frmCUEPlayer parent) + { + _config = parent.Config; + dataSet = parent.DataSet; + MdiParent = parent; + Show(); + _icon_mgr = parent.IconMgr; + listViewTracks.SmallImageList = _icon_mgr.ImageList; + foreach (DataSet1.PlaylistRow row in dataSet.Playlist) + listViewTracks.Items.Add(ToItem(row)); + } + + public ListView List + { + get + { + return listViewTracks; + } + } + + public ListViewItem ToItem(DataSet1.PlaylistRow row) + { + ListViewGroup in_group = null; + string group_name = (row.artist ?? "") + " - " + (row.album ?? ""); + foreach (ListViewGroup group in listViewTracks.Groups) + { + if (group.Name == group_name) + { + in_group = group; + break; + } + } + if (in_group == null) + { + in_group = new ListViewGroup(group_name, group_name); + listViewTracks.Groups.Add(in_group); + } + int iconIndex = _icon_mgr.GetIconIndex(new FileInfo(row.path), true); + ListViewItem item = new ListViewItem(row.title, iconIndex); + TimeSpan Length = TimeSpan.FromSeconds(row.length); + string lenStr = string.Format("{0:d}.{1:d2}:{2:d2}:{3:d2}", Length.Days, Length.Hours, Length.Minutes, Length.Seconds).TrimStart('0', ':', '.'); + item.SubItems.Add(new ListViewItem.ListViewSubItem(item, lenStr)); + item.Group = in_group; + item.Tag = row; + return item; + } + + private void exploreToolStripMenuItem_Click(object sender, EventArgs e) + { + if (listViewTracks.SelectedIndices.Count == 1) + { + int index = listViewTracks.SelectedIndices[0]; + string path = (listViewTracks.Items[index].Tag as DataSet1.PlaylistRow).path; + (MdiParent as frmCUEPlayer).browser.TreeView.SelectedPath = path; + } + } + + private void removeToolStripMenuItem_Click(object sender, EventArgs e) + { + while (listViewTracks.SelectedIndices.Count > 0) + { + int index = listViewTracks.SelectedIndices[0]; + (listViewTracks.Items[index].Tag as DataSet1.PlaylistRow).Delete(); + listViewTracks.Items.RemoveAt(index); + } + } + + private void listViewTracks_DragDrop(object sender, DragEventArgs e) + { + if (e.Data.GetDataPresent(DataFormats.FileDrop)) + { + string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); + if (files.Length == 1) + { + string path = files[0]; + try + { + CUESheet cue = new CUESheet(_config); + cue.Open(path); + for (int iTrack = 0; iTrack < cue.TrackCount; iTrack++) + { + DataSet1.PlaylistRow row = dataSet.Playlist.AddPlaylistRow( + path, + cue.Artist, + cue.Tracks[iTrack].Title, + cue.Title, + (int)cue.TOC[cue.TOC.FirstAudio + iTrack].Length / 75, + iTrack + 1); + listViewTracks.Items.Add(ToItem(row)); + } + cue.Close(); + return; + } + catch (Exception ex) + { + Trace.WriteLine(ex.Message); + } + + FileInfo fi = new FileInfo(path); + if (fi.Extension != ".cue") + { + DataSet1.PlaylistRow row = dataSet.Playlist.AddPlaylistRow( + path, + null, // cue.Artist, + null, // cue.Tracks[iTrack].Title, + null, // cue.Title, + 0, // (int)cue.TOC[cue.TOC.FirstAudio + iTrack].Length / 75, + 0); + listViewTracks.Items.Add(ToItem(row)); + } + } + } + } + + private void listViewTracks_DragOver(object sender, DragEventArgs e) + { + if (e.Data.GetDataPresent(DataFormats.FileDrop)) + { + e.Effect = DragDropEffects.Copy; + } + } + + private void listViewTracks_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Delete) + removeToolStripMenuItem_Click(sender, EventArgs.Empty); + } + + private void listViewTracks_ItemDrag(object sender, ItemDragEventArgs e) + { + if (e.Item != null && e.Item is ListViewItem) + { + DataObject dobj = new DataObject(DataFormats.Serializable, listViewTracks.SelectedIndices); + DragDropEffects effects = DoDragDrop(dobj, DragDropEffects.All); + return; + } + } + } +} diff --git a/CUEPlayer/Playlist.resx b/CUEPlayer/Playlist.resx new file mode 100644 index 0000000..9c5fe4d --- /dev/null +++ b/CUEPlayer/Playlist.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/CUEPlayer/Program.cs b/CUEPlayer/Program.cs new file mode 100644 index 0000000..d9ce000 --- /dev/null +++ b/CUEPlayer/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace CUEPlayer +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new frmCUEPlayer()); + } + } +} diff --git a/CUEPlayer/Properties/AssemblyInfo.cs b/CUEPlayer/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4fe4bde --- /dev/null +++ b/CUEPlayer/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("CUEPlayer")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("CUEPlayer")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2010")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("64db1f35-5084-4f32-adc5-7d5b4059c9bf")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CUEPlayer/Properties/DataSources/frmCUEPlayer.datasource b/CUEPlayer/Properties/DataSources/frmCUEPlayer.datasource new file mode 100644 index 0000000..a71c582 --- /dev/null +++ b/CUEPlayer/Properties/DataSources/frmCUEPlayer.datasource @@ -0,0 +1,10 @@ + + + + CUEPlayer.frmCUEPlayer, CUEPlayer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/CUEPlayer/Properties/Resources.Designer.cs b/CUEPlayer/Properties/Resources.Designer.cs new file mode 100644 index 0000000..3f6c907 --- /dev/null +++ b/CUEPlayer/Properties/Resources.Designer.cs @@ -0,0 +1,147 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4200 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CUEPlayer.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CUEPlayer.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + internal static System.Drawing.Bitmap control_eject { + get { + object obj = ResourceManager.GetObject("control_eject", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap control_eject_blue { + get { + object obj = ResourceManager.GetObject("control_eject_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap control_end_blue { + get { + object obj = ResourceManager.GetObject("control_end_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap control_equalizer_blue { + get { + object obj = ResourceManager.GetObject("control_equalizer_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap control_fastforward_blue { + get { + object obj = ResourceManager.GetObject("control_fastforward_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap control_pause_blue { + get { + object obj = ResourceManager.GetObject("control_pause_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap control_play_blue { + get { + object obj = ResourceManager.GetObject("control_play_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap control_repeat_blue { + get { + object obj = ResourceManager.GetObject("control_repeat_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap control_rewind_blue { + get { + object obj = ResourceManager.GetObject("control_rewind_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap control_start_blue { + get { + object obj = ResourceManager.GetObject("control_start_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap control_stop_blue { + get { + object obj = ResourceManager.GetObject("control_stop_blue", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + internal static System.Drawing.Bitmap ctdb { + get { + object obj = ResourceManager.GetObject("ctdb", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/CUEPlayer/Properties/Resources.resx b/CUEPlayer/Properties/Resources.resx new file mode 100644 index 0000000..ca47dd6 --- /dev/null +++ b/CUEPlayer/Properties/Resources.resx @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\control_eject_blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\control_fastforward_blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\control_start_blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\control_eject.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\control_end_blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\control_repeat_blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\control_rewind_blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\control_pause_blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\control_stop_blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\control_play_blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\control_equalizer_blue.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ctdb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/CUEPlayer/Properties/Settings.Designer.cs b/CUEPlayer/Properties/Settings.Designer.cs new file mode 100644 index 0000000..adad87b --- /dev/null +++ b/CUEPlayer/Properties/Settings.Designer.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.4200 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CUEPlayer.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] + [global::System.Configuration.DefaultSettingValueAttribute("Data Source=|DataDirectory|\\CUEPlayer.sdf")] + public string CUEPlayerConnectionString { + get { + return ((string)(this["CUEPlayerConnectionString"])); + } + } + } +} diff --git a/CUEPlayer/Properties/Settings.settings b/CUEPlayer/Properties/Settings.settings new file mode 100644 index 0000000..c35c471 --- /dev/null +++ b/CUEPlayer/Properties/Settings.settings @@ -0,0 +1,14 @@ + + + + + + <?xml version="1.0" encoding="utf-16"?> +<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <ConnectionString>Data Source=|DataDirectory|\CUEPlayer.sdf</ConnectionString> + <ProviderName>Microsoft.SqlServerCe.Client.3.5</ProviderName> +</SerializableConnectionString> + Data Source=|DataDirectory|\CUEPlayer.sdf + + + \ No newline at end of file diff --git a/CUEPlayer/Resources/control_eject.png b/CUEPlayer/Resources/control_eject.png new file mode 100644 index 0000000000000000000000000000000000000000..924d817bb6dba773de390723aa4ad985a9821713 GIT binary patch literal 603 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7SkfJR9T^zbpD<_bdda}R zAX(xXQ4*Y=R#Ki=l*-_klAn~S;F+74o*I;zm{M7IGS!BGf$^=Ui(`nz>7~IZS1CCP z)W~1`e?|VmrxKC3`T~IgEPE>gzdSfNS>Y0UAdBGkBFl<`_~=}55z%5TuH8=!`^|ZR z1wtmr3QEq5{Oaf;|G(Lu>2F>9tFKjF+i!*ss{na>d(nx*t z*DBxVpJ&STw;y;}vgl}%xz<6&1D zxq5CBDPB=ocS!|BZ6hYJZr1}(i!P=Z2~L*eYZvK0dQbJkPpuz6YwTRv)?fGTS~TJK zW5eLt?Ya?kfk@zk!PO3wTncyH}y*E;)Wjh>#ck#mdi*8~HN`s%61GkfNEEtSysG~u&#JUhdBzs-@(Gw;8j zwzpfBVx;N1I8arFZ}q|e4{jDFDfN|h^Zg&*zZ4(;c>g2w`CAQ-`>*+8z`(%3;OXk; Jvd$@?2>?3E1JVEh literal 0 HcmV?d00001 diff --git a/CUEPlayer/Resources/control_eject_blue.png b/CUEPlayer/Resources/control_eject_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..2bd49638349fd871cbd0fffe70126698e003d52c GIT binary patch literal 727 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7SkfJR9T^zbpD<_bdda}R zAX(xXQ4*Y=R#Ki=l*-_klAn~S;F+74o*I;zm{M7IGS!BGfhp6|#WBR<^wMDOe4#** zcl;m3KUgQcyu@q0x_6PZu(?`}PmD?F(Q=M7pezU_g;`eNa`8C(xoeMm8 zm}RIXGh*Vx56*3igP6UpialvjOF8Wuno@iD@ZFeG z$<|UL7c6hS=Q$>)=DxXf$Da&#y*s5VlQ{k;olIUJ8^^X&W5M?~u90sf7e8Z_oW$BG z;I1BPPBrojLr%F8;&O?#^~&^I4Wc$B$)htTjG>k z3b_efJ8QYTx24MMbU7f;Bgoj(?<%=(p_^N{&y*A2FL+;U`q>)3s^Q;hzZs%O)Iye; zDGH_^6)gOBPQA&SzgED0-Q?MwsVocDnr&sBo2z_o$!66TWsMdwGd~`_s?KO&b1(RR zMO$-j>8=ewO?jp~ZMJebt6P0>$HQ-hHA~H(I>warJbl$7aq?P+V@#pBef*Pk(Mfx= zWpsr8nt80PDe3-Mv_4?PR?k^iI$fr5&P|?aG-FL!VN=}StsaM0+vI)@?CujiC*9#} z6|ZP~aNc1}xodYEXDoZZqww?Z{o$2A4DVLVH1gXQk(`z$9`S2tYkgMQ4|X+e>%=0X k>oZR5m%seq=K1`ydpYezYt>IMFfcH9y85}Sb4q9e0L|4!ssI20 literal 0 HcmV?d00001 diff --git a/CUEPlayer/Resources/control_end_blue.png b/CUEPlayer/Resources/control_end_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..72079357614b4254b163a5cac766093d1f99bbe7 GIT binary patch literal 737 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7SkfJR9T^zbpD<_bdda}R zAX(xXQ4*Y=R#Ki=l*-_klAn~S;F+74o*I;zm{M7IGS!BGfvMQj#WBR<^wP=R`9gsr z$A2^aVX5JZ*i~}auSVsrWV~Tw@}os7wbifQa7}JG!w~2*`x=`T=hX#HSxa24STm)# zSx<=wWHf$~5?ID_zGzNyqoBNX{-^tQ=KO!Z=iOYUhLxVNMomtWye36m`r`5G;@n5) ze|SD-^*q)7x^!*r^OleAkKb%Qp(xMg{`2i#iQmU2C#B_t>K;pYlix7$=c22#mpiq4 zt_xV%tWdVF+)g3O#Cn2u*um}M&&13pi5%-wOl}Z5`|w8j!mIBX@_s7@m82La(oUdHvRgw;BQq zHf=u6Gp%=d%=-gZ)#EC}HBP0Sox}c4N_mNt&BiO57tHLN<5*VI-tUWeBkApWdFt^v zPq~Qi;)(GIAW~S@HUFUBVp63jxsu z#|6}`&JBsW@N(|qRjIx1`iyVd53w{b-q4=4-uABIOx|_LJN}&D-9A%MAvn)7v?MX} z=T@G8`kTF*Oc(OEYL z@jg|1mg1=5^x4>GZXa!q-;*v923b9UtGZ)_I(?oBdpJa!~g_|ea0d;Cn) zm%RBUu6;*0xMs((kIswkw`m+#Umvhy-bAmgblV``T`H5lF0`Dtw&`4sXj4|NNbzZhv`ic;?$X-r}Fn>^O6Y xP56Jz`46A1jICF1Ha4GeW5507|25C&=eKfHJ&E6H%D}+D;OXk;vd$@?2>>stOyd9m literal 0 HcmV?d00001 diff --git a/CUEPlayer/Resources/control_equalizer_blue.png b/CUEPlayer/Resources/control_equalizer_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..1b2e6a3746a730100685186a6d324312880121dc GIT binary patch literal 764 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7SkfJR9T^zbpD<_bdda}R zAX(xXQ4*Y=R#Ki=l*-_klAn~S;F+74o*I;zm{M7IGS!BGfvL~a#WBR<^wQwle!_tw zPnrKT)v>S8SKIgFQih4z5s`SGo=(qNgGn9-5^@Y)Fgq$5UrOL@apGFE!jaWbGfQ%( zXO6d~@!kjlE>^3xhcCS3-8HAyD|_!A%af-({jNn-zqS1x!nk79k(GK9C0AY;yfTnI zR8f)sV{*Kv&7#G-UbZI5{oHfx{Ep^Bk1lO`^Y!P`m8^jkzYGtV^QfOWqWCVKt^JX3 z^E%${a!Z|~kGMi~+y6K=CYn!mEzxd#$vXdvvEVj=?I}S)oxbnjC)bA4m ziYJu5N&R+n?y6Kn)8~P?$&5xT)7Y+vA6<4z^<&?pqkEqx9+?!`b}c>8MR?|>lSiIx zDXCR(dn<8bL7K~tbHQ&WRVdGFT$#(b+B);jo5=-x*0EmS^*5q>xuknfPLuS!ho0VS z$6l^yY^++gBBU_Z@9`sM{%6fx=kC@WKWFT__)LK3(~WblT(JHUrJyT0!=~HYh*x{x z>|{2VHQD8xKd+PfpOI^v$IBvc^HM}t&OZj`KE;_^&K!9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SH^cA3X$%_}cE6gqaYsPz;h)uxJG}TAf9P+m+OXrx9fk<|8b6~&cN*Ik z@mWtgq4UIF{h0{v5X2uD865>;ziYl4JFN-jW zTW{a6*57l(?)y@+Gj=^*eXD7qhPp@YW0jJnr*$7&T%2=pm-T#|;_y2!9~!tRIc8~eE!qi&Hm;u+}EkL%_`^apS$J5g@=i0GK{~3=KlJg f{A>R6Kf;psJjI1dU#BrJFfe$!`njxgN@xNAW6MO* literal 0 HcmV?d00001 diff --git a/CUEPlayer/Resources/control_play_blue.png b/CUEPlayer/Resources/control_play_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..f8c8ec683edd6a974eacc253332f903d643dbe41 GIT binary patch literal 717 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7SkfJR9T^zbpD<_bdda}R zAX(xXQ4*Y=R#Ki=l*-_klAn~S;F+74o*I;zm{M7IGS!BGfhpe8#WBR<^wP<``9gsr zZNHiSu>RqT*i~|P-7LLb#)Zj;jva9g4p%k3>YB`zs1xWj`x={;VD_qQDI&HJA_p7${xxUnKnr^#`u=hVonPXeAj zG(SB54hU6JR9_Nq>Zx+LMJTz6x_D`A=idd$x~nXru^v3+q79a<=xti zH~JWPee8a*x2E!NOZ?3zr^njct1RwcKP=hJj?~+yaX=QH#A3&O|)9rS)fK#-l)vKZbloqMZ^a zPpPiidEGLl^I)NgAJ2vw-eV3-=VcH4=$ZfL^rlN2y7Y9`@43QzCVrpVi(NMw+m^i8 zoAls_OfBoVIonU1UD91zu;We@x7v1lXHhTH7vCEjesXtCv9|l%d4OZtXIWB8w z%QGvT=4X2C>$;w8I;ZjSZkro1a)q}xeyyJ97G8NzcH6ot^O*rE%&cJw#s}vKSMqIR z4xCZ0V;KDHd;R)PFOqltR?44QyU*7)GG?Ky|J*xGb05jwj`_0Xtoz+%lm6HF{Qo?s ao>8_!H2ln=d8!Ny3=E#GelF{r5}E+)nL_RW literal 0 HcmV?d00001 diff --git a/CUEPlayer/Resources/control_repeat_blue.png b/CUEPlayer/Resources/control_repeat_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..406ec333bc036690d4639cbec70e8f586e977699 GIT binary patch literal 750 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7SkfJR9T^zbpD<_bdda}R zAX(xXQ4*Y=R#Ki=l*-_klAn~S;F+74o*I;zm{M7IGS!BGfvLgM#WBR<^wMB&f8juh zr|dtte_1EIywn;i;b{KG=gy3hg`HANhFQ&ODniOjlwG_XFzh73e&W(Jzb?nE^1rPH2hk0BV?zN-6U>{AAt=s><-6S^}A@TpMB=c?pAAOrLD;d z%~tID4+rL0*%lYZ)W5n^`1Yidv-4}FC^qLF;hwjLlj5Iwc(b{E|1RKf8yq5Jd0l01 zR?MkH^O=X&sCTk$7B1S>a(GMEzKP#$GEXkJxOR0%DkEdJDoAjAG{$13$x63tcL+zByK_VBg+pmz8 zu&?F)kg3|=6XkUM3!mP7>C_{Qtt`UvwHCeF{AvaNeJAYov6$C(H0yHoip`eFcgmDH zizIz^l&;wHA~5ji=8Y1@AC4GtsBY4jH^uP3Dns%27CV>2cONQGzPwe*qo~h!W(!M} z;-2ZQvy+AIFEY{=xVWl(pOipeS^N2U8#j4OGn`*pb8TtI%49bm`RQLww)lit%J?rl zY_-NDTCH9;=&RQD+hJ#zzZE9lls>pkWAn^_^NqTk!FuwyboV+1KX2b3zVnyy-B&k_ zw(gtvXkPi(&(o&gz0~dJm-TwXr?awr@7Toud{6&1|NS4~ZztFuCDdh3XJBAp@O1Ta JS?83{1OVUuQ`rCj literal 0 HcmV?d00001 diff --git a/CUEPlayer/Resources/control_rewind_blue.png b/CUEPlayer/Resources/control_rewind_blue.png new file mode 100644 index 0000000000000000000000000000000000000000..15d1584bdbb2c26a9fc4c8269aa54615a58a4657 GIT binary patch literal 745 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7SkfJR9T^zbpD<_bdda}R zAX(xXQ4*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RFRiA<_-z^EY{Io+ja(|}r+Kq)#Uw2unJM56PiJC3CZce;%f5Gj8ms<`d z960y4y5hsV-8bw0+ukWZt_vDYF1gihxq)|k)6-ksQzor$tyL{7S8kri%{+I}z3)r! z6+O&uKG)8W8~EFod*g$fHnR2aLtn()-yZbgV+r&0^{N~BKO2|b{66jf@22pr!auSf z6d!1_Iel)|_rBdk?neUaKvpv+j{Uq+z&ik)=PwR6T9gkA9ns+jIg2lAYKi_<37O&W%=wQ?HI$qPJ zpyR^AX|0`8@2z$?>U1a2Y;|LD!{Wxp4O@2z`>8cNGm@(b7CBX{`z<8t(E6_n&dA|;8J|EsrbU${|U=}MNF`iuoH49*nBPg&yj?Jx103hrko@y2P{y{BQbbx(5L zJE@m^RpF9U2AMMS8TP6vuneybLK+`kDNhhcNcyoF$ zhqlI1FUyk)<=%2F>3X_^JFKEN)vHkB-rU$@7b5>{e)cdU`o1?Shn(}B>r*B4wDW@X zy5C;qUZ~MON$RI$VC8=2$|k1=mfHN*HZqIS_&;uqTqdC7ed3Jbl+>l}d=FW_I2%-- z`F`rvereBy(8JTKSvEIGZ`W>N-ni!5Q-OI+sq-EL#66h!@2-r}%P2j8y-cR3<(v}b zG;_VzFUYum{q|$k)^%5SLrx1FZ|7o6VtshZdB=PAq>t@d{%;jq&MUI)zVz9d^KXEn zt9{R>n)tl-*&?SD@2s$JiJ30?y2|2Uw{yfF=cCnfOVu~XR4qDYp^5^(%hsqTJ8!n~ro}MRviuprx!qfg|-~O{R+?#xA VTIU9V%M1(*44$rjF6*2UngAKy<0k+B literal 0 HcmV?d00001 diff --git a/CUEPlayer/app.config b/CUEPlayer/app.config new file mode 100644 index 0000000..b579cd0 --- /dev/null +++ b/CUEPlayer/app.config @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/CUEPlayer/frmCUEPlayer.Designer.cs b/CUEPlayer/frmCUEPlayer.Designer.cs new file mode 100644 index 0000000..dd6e041 --- /dev/null +++ b/CUEPlayer/frmCUEPlayer.Designer.cs @@ -0,0 +1,51 @@ +namespace CUEPlayer +{ + partial class frmCUEPlayer + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.SuspendLayout(); + // + // frmCUEPlayer + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1200, 477); + this.IsMdiContainer = true; + this.Name = "frmCUEPlayer"; + this.Text = "CUEPlayer 2.0.7"; + this.Load += new System.EventHandler(this.frmCUEPlayer_Load); + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmCUEPlayer_FormClosing); + this.ResumeLayout(false); + + } + + #endregion + + } +} + diff --git a/CUEPlayer/frmCUEPlayer.cs b/CUEPlayer/frmCUEPlayer.cs new file mode 100644 index 0000000..109497f --- /dev/null +++ b/CUEPlayer/frmCUEPlayer.cs @@ -0,0 +1,354 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.IO; +using System.Threading; +using System.Windows.Forms; +using System.Diagnostics; +using NAudio.CoreAudioApi; +using CUEControls; +using CUETools.Codecs; +using CUETools.Codecs.CoreAudio; +using CUETools.DSP.Mixer; +using CUETools.DSP.Resampler; +using CUETools.Processor; + +namespace CUEPlayer +{ + public partial class frmCUEPlayer : Form + { + private ShellIconMgr _icon_mgr; + private CUEConfig _config; + private IWavePlayer _player; + DataSet1TableAdapters.PlaylistTableAdapter adapterPlayList = new DataSet1TableAdapters.PlaylistTableAdapter(); + private DataSet1 dataSet = new DataSet1(); + private Thread mixThread; + private MixingSource _mixer; + private SOXResampler _resampler; + + internal Playlist wndPlaylist + { + get + { + return playlist; + } + } + + internal DataSet1 DataSet + { + get + { + return dataSet; + } + } + + internal CUEConfig Config + { + get + { + return _config; + } + } + + internal ShellIconMgr IconMgr + { + get + { + return _icon_mgr; + } + } + + public MixingSource Mixer + { + get + { + return _mixer; + } + } + + public frmCUEPlayer() + { + InitializeComponent(); + _icon_mgr = new ShellIconMgr(); + _config = new CUEConfig(); + _config.separateDecodingThread = false; + } + + internal Deck deckA = new Deck(0, "A"); + internal Deck deckB = new Deck(1, "B"); + internal Output outputA = new Output(); + internal Browser browser = new Browser(); + internal Playlist playlist = new Playlist(); + + private void frmCUEPlayer_Load(object sender, EventArgs e) + { + int delay = 100; + AudioPCMConfig mixerPCM = AudioPCMConfig.RedBook; + + //System.Data.SqlServerCe.SqlCeDataAdapter ad = new System.Data.SqlServerCe.SqlCeDataAdapter(); + //ad.SelectCommand = new System.Data.SqlServerCe.SqlCeCommand("SELECT * FROM Playlist WHERE track=1", adapterPlayList.Connection); + //ad.Fill(dataSet.Playlist); + adapterPlayList.Fill(dataSet.Playlist); + + _mixer = new MixingSource(mixerPCM, delay, 2); + + outputA.Init(this); + browser.Init(this); + playlist.Init(this); + deckB.Init(this, null); + deckA.Init(this, deckB); + //LayoutMdi(MdiLayout.TileHorizontal); + + browser.Location = new Point(0, 0); + browser.Height = ClientRectangle.Height - 5; + playlist.Location = new Point(browser.Location.X + browser.Width, 0); + playlist.Height = ClientRectangle.Height - 5; + deckA.Location = new Point(playlist.Location.X + playlist.Width, 0); + deckB.Location = new Point(playlist.Location.X + playlist.Width, deckA.Height); + outputA.Location = new Point(deckA.Location.X + deckA.Width, 0); + + try + { + _player = new WasapiOut(outputA.Device, NAudio.CoreAudioApi.AudioClientShareMode.Shared, true, delay, new AudioPCMConfig(32, 2, 44100)); + } + catch + { + _player = null; + } + if (_player == null) + { + try + { + _player = new WasapiOut(outputA.Device, NAudio.CoreAudioApi.AudioClientShareMode.Shared, true, delay, new AudioPCMConfig(32, 2, 48000)); + SOXResamplerConfig cfg; + cfg.quality = SOXResamplerQuality.Very; + cfg.phase = 50; + cfg.allow_aliasing = false; + cfg.bandwidth = 0; + _resampler = new SOXResampler(mixerPCM, _player.PCM, cfg); + } + catch(Exception ex) + { + _player = null; + Trace.WriteLine(ex.Message); + } + } + if (_player != null) + { + _player.Play(); + + mixThread = new Thread(MixThread); + mixThread.Priority = ThreadPriority.AboveNormal; + mixThread.IsBackground = true; + mixThread.Name = "Mixer"; + mixThread.Start(); + } + } + + Thread playThread; + + int playingRow; + + private void PlayThread() + { + AudioBuffer buff = new AudioBuffer(AudioPCMConfig.RedBook, 0x2000); + IAudioSource playingSource = null; + CUESheet playingCue = null; + long playingOffs = 0; + long playingFin = 0; + + try + { + do + { + // End of playlist entry or source file + if (playingSource != null && (playingOffs == playingFin || playingSource.Remaining == 0)) + { + this.Invoke((MethodInvoker)delegate() + { + playlist.List.Items[playingRow].BackColor = Color.White; + }); + playingRow++; + playingOffs = 0; + if (playingRow >= dataSet.Playlist.Rows.Count) + break; + string path = dataSet.Playlist[playingRow].path; + int track = dataSet.Playlist[playingRow].track; + + if (playingCue == null || + playingSource == null || + playingCue.InputPath != path || + playingSource.Position != (long)playingCue.TOC[track].Start * 588) + { + if (playingSource != null) + { + playingSource.Close(); + playingSource = null; + } + if (playingCue != null) + { + playingCue.Close(); + playingCue = null; + } + } + else + { + playingFin = (long)playingCue.TOC[track].Length * 588; + this.Invoke((MethodInvoker)delegate() + { + playlist.List.Items[playingRow].BackColor = Color.AliceBlue; + //deckA.UpdateDeck(dataSet, playingRow, playingCue, playingFin); + }); + } + } + // Open it + if (playingSource == null) + { + string path = dataSet.Playlist[playingRow].path; + int track = dataSet.Playlist[playingRow].track; + + try + { + playingCue = new CUESheet(_config); + playingCue.Open(path); + playingSource = new CUESheetAudio(playingCue); + playingSource.Position = (long)playingCue.TOC[track].Start * 588 + playingOffs; + playingSource = new AudioPipe(playingSource, 0x2000); + playingFin = (long)playingCue.TOC[track].Length * 588; + this.Invoke((MethodInvoker)delegate() + { + playlist.List.Items[playingRow].BackColor = Color.AliceBlue; + //deckA.UpdateDeck(dataSet, playingRow, playingCue, playingFin); + }); + } + catch (Exception ex) + { + // skip it + playingOffs = playingFin = 0; + continue; + } + } + playingSource.Read(buff, (int)(playingFin - playingOffs)); + + this.Invoke((MethodInvoker)delegate() + { + deckA.PlayingOffset = (int)playingOffs; + }); + + _player.Write(buff); + playingOffs += buff.Length; + } while (_player.PlaybackState != PlaybackState.Stopped); + } + catch (Exception ex) + { + // Can't invoke while joining + + //if (playingRow < dataSet.Playlist.Rows.Count) + // this.Invoke((MethodInvoker)delegate() + // { + // listViewTracks.Items[playingRow].BackColor = Color.White; + // }); + } + + if (playingCue != null) + { + playingCue.Close(); + playingCue = null; + } + if (playingSource != null) + { + playingSource.Close(); + playingSource = null; + } + } + + internal void buttonPlay_Click(object sender, EventArgs e) + { + try + { + _player.Stop(); + if (playThread != null) + { + playThread.Join(); + playThread = null; + } + + if (playlist.List.SelectedIndices.Count < 0) + return; + + playingRow = playlist.List.SelectedIndices[0]; + playlist.List.Items[playingRow].BackColor = Color.AliceBlue; + + _player.Play(); + + playThread = new Thread(new ThreadStart(PlayThread)); + playThread.Priority = ThreadPriority.AboveNormal; + playThread.IsBackground = true; + playThread.Start(); + } + catch (Exception ex) + { + Trace.WriteLine(ex.Message); + } + } + + internal void buttonStop_Click(object sender, EventArgs e) + { + try + { + _player.Stop(); + if (playThread != null) + { + playThread.Join(); + playThread = null; + } + } + catch (Exception ex) + { + Trace.WriteLine(ex.Message); + } + } + + internal void buttonPause_Click(object sender, EventArgs e) + { + _player.Pause(); + } + + private void frmCUEPlayer_FormClosing(object sender, FormClosingEventArgs e) + { + try + { + int rowsAffected = adapterPlayList.Update(dataSet.Playlist); + } + catch (Exception ex) + { + System.Diagnostics.Trace.WriteLine(ex.Message); + } + } + + private void MixThread() + { + AudioBuffer result = new AudioBuffer( + new AudioPCMConfig(_player.PCM.BitsPerSample, _player.PCM.ChannelCount, _mixer.PCM.SampleRate), _mixer.BufferSize); + AudioBuffer resampled = _resampler == null ? null : new AudioBuffer(_player.PCM, _mixer.BufferSize * 2 * _mixer.PCM.SampleRate / _player.PCM.SampleRate); + while (true) + { + //Trace.WriteLine(string.Format("Read")); + _mixer.Read(result, -1); + if (_resampler == null) + _player.Write(result); + else + { + //Trace.WriteLine(string.Format("Flow: {0}", result.Length)); + _resampler.Flow(result, resampled); + //Trace.WriteLine(string.Format("Play: {0}", resampled.Length)); + if (resampled.Length != 0) + _player.Write(resampled); + } + } + } + } +} diff --git a/CUEPlayer/frmCUEPlayer.resx b/CUEPlayer/frmCUEPlayer.resx new file mode 100644 index 0000000..e5c789f --- /dev/null +++ b/CUEPlayer/frmCUEPlayer.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 39 + + \ No newline at end of file diff --git a/CUERipper/Properties/Resources.ru-RU.resx b/CUERipper/Properties/Resources.ru-RU.resx new file mode 100644 index 0000000..c3a8a0e --- /dev/null +++ b/CUERipper/Properties/Resources.ru-RU.resx @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Определение приводов + + + Извлечение завершено + + + Судя по всему, были ошибки + + + Можете попытаться исправить ошибки с помощью CUETools + + + Ошибка + + + Не удалось загрузить библиотеку + + + Поиск альбома в базе + + + Приводы не найдены + + + Пауза + + + повтор + + \ No newline at end of file diff --git a/CUERipper/frmCUERipper.ru-RU.resx b/CUERipper/frmCUERipper.ru-RU.resx new file mode 100644 index 0000000..7ae3baa --- /dev/null +++ b/CUERipper/frmCUERipper.ru-RU.resx @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + Редактирование названий треков начинается двойным кликом мыши + + + Название + + + Начало + + + Длина + + + Поехали + + + Стоп + + + Пауза + + + 61, 13 + + + Смещение + + + 120, 17 + + + Отчет в стиле EAC + + + Для выбора шаблона выходной папки кликните мышкой + + \ No newline at end of file diff --git a/CUETools.Codecs.CoreAudio/WasapiOut.cs b/CUETools.Codecs.CoreAudio/WasapiOut.cs index 6ec1b51..cbc4d20 100644 --- a/CUETools.Codecs.CoreAudio/WasapiOut.cs +++ b/CUETools.Codecs.CoreAudio/WasapiOut.cs @@ -17,7 +17,8 @@ namespace CUETools.Codecs.CoreAudio AudioClient audioClient; AudioClientShareMode shareMode; AudioRenderClient renderClient; - int latencyMilliseconds; + bool audioClient_started = false; + int latencyMilliseconds; int bufferFrameCount; bool isUsingEventSync; EventWaitHandle frameEventWaitHandle; @@ -26,7 +27,8 @@ namespace CUETools.Codecs.CoreAudio Thread playThread; private long _sampleOffset; private AudioPCMConfig pcm; - private NAudio.Wave.WaveFormat outputFormat; + private NAudio.Wave.WaveFormatExtensible outputFormat; + WaitHandle[] waitHandles; /// /// Playback Stopped @@ -70,7 +72,7 @@ namespace CUETools.Codecs.CoreAudio this.isUsingEventSync = useEventSync; this.latencyMilliseconds = latency; this.pcm = pcm; - this.outputFormat = new NAudio.Wave.WaveFormat(pcm.SampleRate, pcm.BitsPerSample, pcm.ChannelCount); + this.outputFormat = new NAudio.Wave.WaveFormatExtensible(pcm.SampleRate, pcm.BitsPerSample, pcm.ChannelCount); NAudio.Wave.WaveFormatExtensible closestSampleRateFormat; if (!audioClient.IsFormatSupported(shareMode, outputFormat, out closestSampleRateFormat)) throw new NotSupportedException("PCM format mismatch"); @@ -142,7 +144,6 @@ namespace CUETools.Codecs.CoreAudio ReleaseBuffer(buff, false, 0); // Create WaitHandle for sync - WaitHandle[] waitHandles = new WaitHandle[] { frameEventWaitHandle }; if (frameEventWaitHandle != null) frameEventWaitHandle.Reset(); audioClient.Start(); @@ -263,11 +264,14 @@ namespace CUETools.Codecs.CoreAudio return; case PlaybackState.Stopped: playbackState = PlaybackState.Playing; - playThread = new Thread(new ThreadStart(PlayThread)); - playThread.Priority = ThreadPriority.Highest; - playThread.IsBackground = true; - playThread.Name = "Pro Audio"; - playThread.Start(); + if (shareMode == AudioClientShareMode.Exclusive) + { + playThread = new Thread(new ThreadStart(PlayThread)); + playThread.Priority = ThreadPriority.Highest; + playThread.IsBackground = true; + playThread.Name = "Pro Audio"; + playThread.Start(); + } return; } } @@ -282,8 +286,16 @@ namespace CUETools.Codecs.CoreAudio playbackState = PlaybackState.Stopped; if (frameEventWaitHandle != null) frameEventWaitHandle.Set(); - playThread.Join(); - playThread = null; + if (audioClient_started) + { + audioClient.Stop(); + audioClient_started = false; + } + if (playThread != null) + { + playThread.Join(); + playThread = null; + } ReleaseBuffer(readBuffers[0], false, 0); ReleaseBuffer(readBuffers[1], false, 0); active = null; @@ -325,11 +337,12 @@ namespace CUETools.Codecs.CoreAudio if (shareMode == AudioClientShareMode.Shared) { // With EventCallBack and Shared, both latencies must be set to 0 - audioClient.Initialize(shareMode, AudioClientStreamFlags.EventCallback, 0, 0, + audioClient.Initialize(shareMode, AudioClientStreamFlags.EventCallback, latencyRefTimes, 0, outputFormat, Guid.Empty); // Get back the effective latency from AudioClient - latencyMilliseconds = (int)(audioClient.StreamLatency / 10000); + // This is all wrong! it should be treated differently + // latencyMilliseconds = (int)(audioClient.StreamLatency / 10000); } else { @@ -349,6 +362,8 @@ namespace CUETools.Codecs.CoreAudio outputFormat, Guid.Empty); } + waitHandles = new WaitHandle[] { frameEventWaitHandle }; + // Get the RenderClient renderClient = audioClient.AudioRenderClient; inited = true; @@ -402,25 +417,59 @@ namespace CUETools.Codecs.CoreAudio Stop(); return; } - int src_offs = 0; - do + if (src.PCM.BitsPerSample != pcm.BitsPerSample || src.PCM.ChannelCount != pcm.ChannelCount) + throw new NotSupportedException(); + if (playThread != null) { - if (active == null) - active = GetBuffer(true); - if (active == null) - throw new Exception("done"); - int toCopy = Math.Min(active.Size - active_offset, src.Length - src_offs); - Array.Copy(src.Bytes, src_offs * pcm.BlockAlign, active.Bytes, active_offset * pcm.BlockAlign, toCopy * pcm.BlockAlign); - src_offs += toCopy; - active_offset += toCopy; - if (active_offset == active.Size) + int src_offs = 0; + do { - ReleaseBuffer(active, true, active.Size); - active = null; - active_offset = 0; + if (active == null) + active = GetBuffer(true); + if (active == null) + throw new Exception("done"); + int toCopy = Math.Min(active.Size - active_offset, src.Length - src_offs); + Buffer.BlockCopy(src.Bytes, src_offs * pcm.BlockAlign, active.Bytes, active_offset * pcm.BlockAlign, toCopy * pcm.BlockAlign); + src_offs += toCopy; + active_offset += toCopy; + if (active_offset == active.Size) + { + ReleaseBuffer(active, true, active.Size); + active = null; + active_offset = 0; + } } + while (src_offs < src.Length); + } + else + { + int src_offs = 0; + byte[] b = src.Bytes; + if (!audioClient_started) + { + audioClient.Reset(); + if (frameEventWaitHandle != null) + frameEventWaitHandle.Set(); + audioClient.Start(); + audioClient_started = true; + } + do + { + // If using Event Sync, Wait for notification from AudioClient or Sleep half latency + int indexHandle = WaitHandle.WaitAny(waitHandles, latencyMilliseconds / 2, false); + + // See how much buffer space is available. + int numFramesAvailable = Math.Min(bufferFrameCount - audioClient.CurrentPadding, src.Length - src_offs); + if (numFramesAvailable > 0) + { + //Trace.WriteLine(string.Format("Write {0}", numFramesAvailable)); + IntPtr buffer = renderClient.GetBuffer(numFramesAvailable); + Marshal.Copy(b, src_offs * pcm.BlockAlign, buffer, numFramesAvailable * pcm.BlockAlign); + renderClient.ReleaseBuffer(numFramesAvailable, AudioClientBufferFlags.None); + src_offs += numFramesAvailable; + } + } while (src_offs < src.Length); } - while (src_offs < src.Length); } #endregion diff --git a/CUETools.Codecs/Codecs.cs b/CUETools.Codecs/Codecs.cs index 5bdda5c..b7d4b5e 100644 --- a/CUETools.Codecs/Codecs.cs +++ b/CUETools.Codecs/Codecs.cs @@ -531,6 +531,8 @@ namespace CUETools.Codecs FloatToBytes_16(inSamples, inSampleOffset, outSamples, outByteOffset, sampleCount, channelCount); //else if (bitsPerSample > 16 && bitsPerSample <= 24) // FLACSamplesToBytes_24(inSamples, inSampleOffset, outSamples, outByteOffset, sampleCount, channelCount, 24 - bitsPerSample); + else if (bitsPerSample == 32) + Buffer.BlockCopy(inSamples, inSampleOffset * 4 * channelCount, outSamples, outByteOffset, sampleCount * 4 * channelCount); else throw new Exception("Unsupported bitsPerSample value"); } @@ -2016,6 +2018,7 @@ namespace CUETools.Codecs _workThread = new Thread(Decompress); _workThread.Priority = priority; _workThread.IsBackground = true; + _workThread.Name = "AudioPipe"; _workThread.Start(null); } diff --git a/CUETools.DSP.Mixer/Mixer.cs b/CUETools.DSP.Mixer/Mixer.cs index cee61a7..77acce1 100644 --- a/CUETools.DSP.Mixer/Mixer.cs +++ b/CUETools.DSP.Mixer/Mixer.cs @@ -10,8 +10,7 @@ namespace CUETools.DSP.Mixer public class MixingSource : IAudioSource { AudioPCMConfig pcm; - MixingBuffer buf0; - MixingBuffer buf1; + MixingBuffer[] buf; bool[] playing; float[] volume; long samplePos; @@ -21,8 +20,9 @@ namespace CUETools.DSP.Mixer { this.pcm = pcm; this.size = delay * pcm.SampleRate / 1000; - this.buf0 = new MixingBuffer(pcm, size, sources); - this.buf1 = new MixingBuffer(pcm, size, sources); + this.buf = new MixingBuffer[2]; + this.buf[0] = new MixingBuffer(pcm, size, sources); + this.buf[1] = new MixingBuffer(pcm, size, sources); this.playing = new bool[sources]; this.volume = new float[sources]; this.samplePos = 0; @@ -83,10 +83,10 @@ namespace CUETools.DSP.Mixer float sumVolume = 0.0f; for (int iSource = 0; iSource < mixbuff.source.Length; iSource++) - if (playing[iSource]) + if (mixbuff.filled[iSource]) sumVolume += mixbuff.volume[iSource]; for (int iSource = 0; iSource < mixbuff.source.Length; iSource++) - volume[iSource] = playing[iSource] ? mixbuff.volume[iSource] / Math.Max(1.0f, sumVolume) : 0.0f; + volume[iSource] = mixbuff.filled[iSource] ? mixbuff.volume[iSource] / Math.Max(1.0f, sumVolume) : 0.0f; for (int iSmp = 0; iSmp < result.Length; iSmp++) { for (int iChan = 0; iChan < result.PCM.ChannelCount; iChan++) @@ -114,7 +114,7 @@ namespace CUETools.DSP.Mixer { get { - return buf0.source[0].Size; + return buf[0].source[0].Size; } } @@ -126,6 +126,8 @@ namespace CUETools.DSP.Mixer return res; } + int current = 0; + internal MixingBuffer LockFilledBuffer() { lock (this) @@ -133,9 +135,11 @@ namespace CUETools.DSP.Mixer //Trace.WriteLine(string.Format("LockFilledBuffer: 0.0: {0} {1}; 0.1: {2} {3}; 1.0: {4} {5}; 1.1: {6} {7};", // buf0.playing[0], buf0.filled[0], buf0.playing[1], buf0.filled[1], // buf0.playing[0], buf0.filled[0], buf0.playing[1], buf0.filled[1])); - while (!IsFilled(buf0) && !IsFilled(buf1)) + int no = current; + while (!IsFilled(buf[no])) Monitor.Wait(this); - return IsFilled(buf0) ? buf0 : buf1; + current = 1 - no; + return buf[no]; } } @@ -179,10 +183,10 @@ namespace CUETools.DSP.Mixer // buf0.playing[0], buf0.filled[0], buf0.playing[1], buf0.filled[1], // buf0.playing[0], buf0.filled[0], buf0.playing[1], buf0.filled[1], iSource)); - while (!playing[iSource] || (buf0.filled[iSource] && buf1.filled[iSource])) + while (!playing[iSource] || buf[current].filled[iSource]) Monitor.Wait(this); - return !buf0.filled[iSource] ? buf0 : buf1; + return buf[current]; } } @@ -301,6 +305,17 @@ namespace CUETools.DSP.Mixer mixer.LockEmptyBuffer(iSource); } + public void Flush() + { + if (mixbuff != null) + { + if (mixbuff.source[iSource].Length < mixbuff.source[iSource].Size) + AudioSamples.MemSet(mixbuff.source[iSource].Bytes, 0, mixbuff.source[iSource].Length * PCM.BlockAlign, (mixbuff.source[iSource].Size - mixbuff.source[iSource].Length) * PCM.BlockAlign); + mixer.UnlockEmptyBuffer(mixbuff, iSource, volume); + mixbuff = null; + } + } + public void Write(AudioBuffer buff) { int bs = PCM.BlockAlign; diff --git a/CUETools/CUETools.TestCodecs/CUETools.TestCodecs.csproj b/CUETools/CUETools.TestCodecs/CUETools.TestCodecs.csproj index 7269a26..067deec 100644 --- a/CUETools/CUETools.TestCodecs/CUETools.TestCodecs.csproj +++ b/CUETools/CUETools.TestCodecs/CUETools.TestCodecs.csproj @@ -25,10 +25,11 @@ DEBUG;TRACE - false + true false ..\bin\Release\ DEBUG;TRACE + full @@ -43,6 +44,7 @@ + @@ -67,6 +69,10 @@ {6458A13A-30EF-45A9-9D58-E5031B17BEE2} CUETools.Codecs + + {A6303861-CA06-4C2C-A104-BA9291538F6F} + CUETools.DSP.Resampler + \ No newline at end of file diff --git a/CUETools/CUETools.TestCodecs/SOXResamplerTest.cs b/CUETools/CUETools.TestCodecs/SOXResamplerTest.cs new file mode 100644 index 0000000..27ec106 --- /dev/null +++ b/CUETools/CUETools.TestCodecs/SOXResamplerTest.cs @@ -0,0 +1,100 @@ +using CUETools.DSP.Resampler; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using CUETools.Codecs; +using System; + +namespace CUETools.TestCodecs +{ + + + /// + ///This is a test class for SOXResamplerTest and is intended + ///to contain all SOXResamplerTest Unit Tests + /// + [TestClass()] + public class SOXResamplerTest + { + + + private TestContext testContextInstance; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + #region Additional test attributes + // + //You can use the following additional attributes as you write your tests: + // + //Use ClassInitialize to run code before running the first test in the class + //[ClassInitialize()] + //public static void MyClassInitialize(TestContext testContext) + //{ + //} + // + //Use ClassCleanup to run code after all tests in a class have run + //[ClassCleanup()] + //public static void MyClassCleanup() + //{ + //} + // + //Use TestInitialize to run code before running each test + //[TestInitialize()] + //public void MyTestInitialize() + //{ + //} + // + //Use TestCleanup to run code after each test has run + //[TestCleanup()] + //public void MyTestCleanup() + //{ + //} + // + #endregion + + + /// + ///A test for SOXResampler Constructor + /// + [TestMethod()] + public void SOXResamplerConstructorTest() + { + AudioPCMConfig inputPCM = new AudioPCMConfig(32, 1, 44100); + AudioPCMConfig outputPCM = new AudioPCMConfig(32, 1, 48000); + SOXResamplerConfig cfg; + cfg.quality = SOXResamplerQuality.Very; + cfg.phase = 50; + cfg.allow_aliasing = false; + cfg.bandwidth = 0; + SOXResampler resampler = new SOXResampler(inputPCM, outputPCM, cfg); + AudioBuffer src = new AudioBuffer(inputPCM, 400 * inputPCM.SampleRate / 1000); + AudioBuffer dst = new AudioBuffer(outputPCM, src.Size * 3); + int offs = 0; + double delta = 0; + for (int i = 0; i < 100; i++) + { + src.Prepare(-1); + for (int j = 0; j < src.Size; j++) + src.Float[j, 0] = (float)Math.Sin((i * src.Size + j) * Math.PI / 44100); + src.Length = src.Size; + resampler.Flow(src, dst); + for (int j = 0; j < dst.Length; j++) + delta += dst.Float[j, 0] - Math.Sin((offs + j) * Math.PI / 48000); + offs += dst.Length; + } + Assert.IsTrue(Math.Abs(delta) < 0.00001, "Error too large"); + } + } +} diff --git a/CUETools/CUETools.sln b/CUETools/CUETools.sln index aaa5170..5b2e288 100644 --- a/CUETools/CUETools.sln +++ b/CUETools/CUETools.sln @@ -159,6 +159,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUEPlayer", "..\CUEPlayer\C EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.CoreAudio", "..\CUETools.Codecs.CoreAudio\CUETools.Codecs.CoreAudio.csproj", "{FAD09EE2-D6B2-4A8E-9F1C-2A9FB293661A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.LAME", "..\CUETools.Codecs.LAME\CUETools.Codecs.LAME.csproj", "{1AF02E2C-2CB2-44B5-B417-37653071FEC6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.Codecs.DirectSound", "..\CUETools.Codecs.DirectSound\CUETools.Codecs.DirectSound.csproj", "{5A9FB016-6388-475D-AB33-6F86AD49FDAD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.DSP.Mixer", "..\CUETools.DSP.Mixer\CUETools.DSP.Mixer.csproj", "{AFF1AFF9-839D-4892-88CD-8BD09BAFC1D2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.DSP.Resampler", "..\CUETools.DSP.Resampler\CUETools.DSP.Resampler.csproj", "{A6303861-CA06-4C2C-A104-BA9291538F6F}" +EndProject Global GlobalSection(TestCaseManagementSettings) = postSolution CategoryFile = CUETools1.vsmdi @@ -590,6 +598,38 @@ Global {FAD09EE2-D6B2-4A8E-9F1C-2A9FB293661A}.Release|Any CPU.Build.0 = Release|Any CPU {FAD09EE2-D6B2-4A8E-9F1C-2A9FB293661A}.Release|Win32.ActiveCfg = Release|Any CPU {FAD09EE2-D6B2-4A8E-9F1C-2A9FB293661A}.Release|x64.ActiveCfg = Release|Any CPU + {1AF02E2C-2CB2-44B5-B417-37653071FEC6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1AF02E2C-2CB2-44B5-B417-37653071FEC6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1AF02E2C-2CB2-44B5-B417-37653071FEC6}.Debug|Win32.ActiveCfg = Debug|Any CPU + {1AF02E2C-2CB2-44B5-B417-37653071FEC6}.Debug|x64.ActiveCfg = Debug|Any CPU + {1AF02E2C-2CB2-44B5-B417-37653071FEC6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1AF02E2C-2CB2-44B5-B417-37653071FEC6}.Release|Any CPU.Build.0 = Release|Any CPU + {1AF02E2C-2CB2-44B5-B417-37653071FEC6}.Release|Win32.ActiveCfg = Release|Any CPU + {1AF02E2C-2CB2-44B5-B417-37653071FEC6}.Release|x64.ActiveCfg = Release|Any CPU + {5A9FB016-6388-475D-AB33-6F86AD49FDAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5A9FB016-6388-475D-AB33-6F86AD49FDAD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A9FB016-6388-475D-AB33-6F86AD49FDAD}.Debug|Win32.ActiveCfg = Debug|Any CPU + {5A9FB016-6388-475D-AB33-6F86AD49FDAD}.Debug|x64.ActiveCfg = Debug|Any CPU + {5A9FB016-6388-475D-AB33-6F86AD49FDAD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5A9FB016-6388-475D-AB33-6F86AD49FDAD}.Release|Any CPU.Build.0 = Release|Any CPU + {5A9FB016-6388-475D-AB33-6F86AD49FDAD}.Release|Win32.ActiveCfg = Release|Any CPU + {5A9FB016-6388-475D-AB33-6F86AD49FDAD}.Release|x64.ActiveCfg = Release|Any CPU + {AFF1AFF9-839D-4892-88CD-8BD09BAFC1D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AFF1AFF9-839D-4892-88CD-8BD09BAFC1D2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AFF1AFF9-839D-4892-88CD-8BD09BAFC1D2}.Debug|Win32.ActiveCfg = Debug|Any CPU + {AFF1AFF9-839D-4892-88CD-8BD09BAFC1D2}.Debug|x64.ActiveCfg = Debug|Any CPU + {AFF1AFF9-839D-4892-88CD-8BD09BAFC1D2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AFF1AFF9-839D-4892-88CD-8BD09BAFC1D2}.Release|Any CPU.Build.0 = Release|Any CPU + {AFF1AFF9-839D-4892-88CD-8BD09BAFC1D2}.Release|Win32.ActiveCfg = Release|Any CPU + {AFF1AFF9-839D-4892-88CD-8BD09BAFC1D2}.Release|x64.ActiveCfg = Release|Any CPU + {A6303861-CA06-4C2C-A104-BA9291538F6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A6303861-CA06-4C2C-A104-BA9291538F6F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A6303861-CA06-4C2C-A104-BA9291538F6F}.Debug|Win32.ActiveCfg = Debug|Any CPU + {A6303861-CA06-4C2C-A104-BA9291538F6F}.Debug|x64.ActiveCfg = Debug|Any CPU + {A6303861-CA06-4C2C-A104-BA9291538F6F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A6303861-CA06-4C2C-A104-BA9291538F6F}.Release|Any CPU.Build.0 = Release|Any CPU + {A6303861-CA06-4C2C-A104-BA9291538F6F}.Release|Win32.ActiveCfg = Release|Any CPU + {A6303861-CA06-4C2C-A104-BA9291538F6F}.Release|x64.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -624,6 +664,7 @@ Global {082D6B9E-326E-4D15-9798-EDAE9EDE70A6} = {93B7AE1D-DEF6-4A04-A222-5CDE09DF262D} {DFE50673-906C-4B8F-993B-A24CAD1CA17D} = {93B7AE1D-DEF6-4A04-A222-5CDE09DF262D} {DDE1EA77-637C-4D5F-96F3-1328BC45CE80} = {93B7AE1D-DEF6-4A04-A222-5CDE09DF262D} + {1AF02E2C-2CB2-44B5-B417-37653071FEC6} = {93B7AE1D-DEF6-4A04-A222-5CDE09DF262D} {04945FB2-8410-4F14-8262-2ED18DCDACD6} = {D9D97BB6-002F-4858-8EF2-49B4C4C4DDB4} {A430AD28-B76A-4ED0-AF7D-D13B8969297F} = {D9D97BB6-002F-4858-8EF2-49B4C4C4DDB4} {5C8B61C0-BC3D-4316-B8A7-419D55BB5796} = {D9D97BB6-002F-4858-8EF2-49B4C4C4DDB4} diff --git a/CUETools/CUETools1.vsmdi b/CUETools/CUETools1.vsmdi index 72f5653..bfa89ec 100644 --- a/CUETools/CUETools1.vsmdi +++ b/CUETools/CUETools1.vsmdi @@ -3,7 +3,7 @@ - +