Rip out sample rate config
This commit is contained in:
parent
566ec51a8a
commit
56cce7ab2b
|
@ -133,7 +133,6 @@
|
||||||
public bool SoundEnabled = true;
|
public bool SoundEnabled = true;
|
||||||
public bool MuteFrameAdvance = true;
|
public bool MuteFrameAdvance = true;
|
||||||
public int SoundVolume = 100; //Range 0-100
|
public int SoundVolume = 100; //Range 0-100
|
||||||
public int SoundSampleRateIndex = 2; //0 = 22050, 1 = 32000, 2 = 44100, 3 = 48000, 4 = 960000
|
|
||||||
|
|
||||||
// Lua Console
|
// Lua Console
|
||||||
public RecentFiles RecentLua = new RecentFiles(8);
|
public RecentFiles RecentLua = new RecentFiles(8);
|
||||||
|
|
|
@ -176,26 +176,6 @@ namespace BizHawk.MultiClient
|
||||||
if (Global.Config.SoundEnabled)
|
if (Global.Config.SoundEnabled)
|
||||||
vol = -5000;
|
vol = -5000;
|
||||||
DSoundBuffer.Volume = 0 - ((100 - Global.Config.SoundVolume) * 50);
|
DSoundBuffer.Volume = 0 - ((100 - Global.Config.SoundVolume) * 50);
|
||||||
|
|
||||||
switch (Global.Config.SoundSampleRateIndex)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
DSoundBuffer.Format.SamplesPerSecond = 22050;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
DSoundBuffer.Format.SamplesPerSecond = 32000;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
case 2:
|
|
||||||
DSoundBuffer.Format.SamplesPerSecond = 44100;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
DSoundBuffer.Format.SamplesPerSecond = 48000;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
DSoundBuffer.Format.SamplesPerSecond = 96000;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,12 +35,9 @@
|
||||||
this.SoundVolGroup = new System.Windows.Forms.GroupBox();
|
this.SoundVolGroup = new System.Windows.Forms.GroupBox();
|
||||||
this.SoundVolBar = new System.Windows.Forms.TrackBar();
|
this.SoundVolBar = new System.Windows.Forms.TrackBar();
|
||||||
this.SoundVolNumeric = new System.Windows.Forms.NumericUpDown();
|
this.SoundVolNumeric = new System.Windows.Forms.NumericUpDown();
|
||||||
this.SampleRateCombo = new System.Windows.Forms.ComboBox();
|
|
||||||
this.SampleRateBox = new System.Windows.Forms.GroupBox();
|
|
||||||
this.SoundVolGroup.SuspendLayout();
|
this.SoundVolGroup.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.SoundVolBar)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.SoundVolBar)).BeginInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.SoundVolNumeric)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.SoundVolNumeric)).BeginInit();
|
||||||
this.SampleRateBox.SuspendLayout();
|
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// Cancel
|
// Cancel
|
||||||
|
@ -118,31 +115,6 @@
|
||||||
this.SoundVolNumeric.TabIndex = 0;
|
this.SoundVolNumeric.TabIndex = 0;
|
||||||
this.SoundVolNumeric.ValueChanged += new System.EventHandler(this.SoundVolNumeric_ValueChanged);
|
this.SoundVolNumeric.ValueChanged += new System.EventHandler(this.SoundVolNumeric_ValueChanged);
|
||||||
//
|
//
|
||||||
// SampleRateCombo
|
|
||||||
//
|
|
||||||
this.SampleRateCombo.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
|
||||||
this.SampleRateCombo.FormattingEnabled = true;
|
|
||||||
this.SampleRateCombo.Items.AddRange(new object[] {
|
|
||||||
"22050",
|
|
||||||
"32000",
|
|
||||||
"44100",
|
|
||||||
"48000",
|
|
||||||
"96000"});
|
|
||||||
this.SampleRateCombo.Location = new System.Drawing.Point(6, 19);
|
|
||||||
this.SampleRateCombo.Name = "SampleRateCombo";
|
|
||||||
this.SampleRateCombo.Size = new System.Drawing.Size(121, 21);
|
|
||||||
this.SampleRateCombo.TabIndex = 5;
|
|
||||||
//
|
|
||||||
// SampleRateBox
|
|
||||||
//
|
|
||||||
this.SampleRateBox.Controls.Add(this.SampleRateCombo);
|
|
||||||
this.SampleRateBox.Location = new System.Drawing.Point(127, 71);
|
|
||||||
this.SampleRateBox.Name = "SampleRateBox";
|
|
||||||
this.SampleRateBox.Size = new System.Drawing.Size(135, 53);
|
|
||||||
this.SampleRateBox.TabIndex = 6;
|
|
||||||
this.SampleRateBox.TabStop = false;
|
|
||||||
this.SampleRateBox.Text = "Sample Rate";
|
|
||||||
//
|
|
||||||
// SoundConfig
|
// SoundConfig
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.OK;
|
this.AcceptButton = this.OK;
|
||||||
|
@ -150,7 +122,6 @@
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.CancelButton = this.Cancel;
|
this.CancelButton = this.Cancel;
|
||||||
this.ClientSize = new System.Drawing.Size(355, 286);
|
this.ClientSize = new System.Drawing.Size(355, 286);
|
||||||
this.Controls.Add(this.SampleRateBox);
|
|
||||||
this.Controls.Add(this.SoundVolGroup);
|
this.Controls.Add(this.SoundVolGroup);
|
||||||
this.Controls.Add(this.MuteFrameAdvance);
|
this.Controls.Add(this.MuteFrameAdvance);
|
||||||
this.Controls.Add(this.SoundOnCheckBox);
|
this.Controls.Add(this.SoundOnCheckBox);
|
||||||
|
@ -164,7 +135,6 @@
|
||||||
this.SoundVolGroup.PerformLayout();
|
this.SoundVolGroup.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.SoundVolBar)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.SoundVolBar)).EndInit();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.SoundVolNumeric)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.SoundVolNumeric)).EndInit();
|
||||||
this.SampleRateBox.ResumeLayout(false);
|
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
@ -179,7 +149,5 @@
|
||||||
private System.Windows.Forms.GroupBox SoundVolGroup;
|
private System.Windows.Forms.GroupBox SoundVolGroup;
|
||||||
private System.Windows.Forms.NumericUpDown SoundVolNumeric;
|
private System.Windows.Forms.NumericUpDown SoundVolNumeric;
|
||||||
private System.Windows.Forms.TrackBar SoundVolBar;
|
private System.Windows.Forms.TrackBar SoundVolBar;
|
||||||
private System.Windows.Forms.ComboBox SampleRateCombo;
|
|
||||||
private System.Windows.Forms.GroupBox SampleRateBox;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -22,7 +22,6 @@ namespace BizHawk.MultiClient
|
||||||
MuteFrameAdvance.Checked = Global.Config.MuteFrameAdvance;
|
MuteFrameAdvance.Checked = Global.Config.MuteFrameAdvance;
|
||||||
SoundVolBar.Value = Global.Config.SoundVolume;
|
SoundVolBar.Value = Global.Config.SoundVolume;
|
||||||
SoundVolNumeric.Value = Global.Config.SoundVolume;
|
SoundVolNumeric.Value = Global.Config.SoundVolume;
|
||||||
SampleRateCombo.SelectedIndex = Global.Config.SoundSampleRateIndex;
|
|
||||||
UpdateSoundDialog();
|
UpdateSoundDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +31,6 @@ namespace BizHawk.MultiClient
|
||||||
Global.Config.MuteFrameAdvance = MuteFrameAdvance.Checked;
|
Global.Config.MuteFrameAdvance = MuteFrameAdvance.Checked;
|
||||||
Global.Config.SoundVolume = SoundVolBar.Value;
|
Global.Config.SoundVolume = SoundVolBar.Value;
|
||||||
Global.Sound.ChangeVolume(Global.Config.SoundVolume);
|
Global.Sound.ChangeVolume(Global.Config.SoundVolume);
|
||||||
Global.Config.SoundSampleRateIndex = SampleRateCombo.SelectedIndex;
|
|
||||||
Global.Sound.UpdateSoundSettings();
|
Global.Sound.UpdateSoundSettings();
|
||||||
Global.Sound.StartSound();
|
Global.Sound.StartSound();
|
||||||
this.Close();
|
this.Close();
|
||||||
|
@ -63,13 +61,11 @@ namespace BizHawk.MultiClient
|
||||||
if (SoundOnCheckBox.Checked)
|
if (SoundOnCheckBox.Checked)
|
||||||
{
|
{
|
||||||
SoundVolGroup.Enabled = true;
|
SoundVolGroup.Enabled = true;
|
||||||
SampleRateBox.Enabled = true;
|
|
||||||
MuteFrameAdvance.Enabled = true;
|
MuteFrameAdvance.Enabled = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SoundVolGroup.Enabled = false;
|
SoundVolGroup.Enabled = false;
|
||||||
SampleRateBox.Enabled = false;
|
|
||||||
MuteFrameAdvance.Enabled = false;
|
MuteFrameAdvance.Enabled = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue