Adjusted sending rate and made other changes
This commit is contained in:
parent
3ecb1440a2
commit
907c2302d3
2 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ namespace MCAudioSpectrumAnalyzer
|
||||||
_t.Tick += _t_Tick;
|
_t.Tick += _t_Tick;
|
||||||
//_t.Interval = 25; //40hz refresh rate
|
//_t.Interval = 25; //40hz refresh rate
|
||||||
//_t.Interval = 50; //20 Hz
|
//_t.Interval = 50; //20 Hz
|
||||||
_t.Interval = 1000;
|
_t.Interval = 400;
|
||||||
_t.Enabled = false;
|
_t.Enabled = false;
|
||||||
_l = left;
|
_l = left;
|
||||||
_r = right;
|
_r = right;
|
||||||
|
|
|
@ -37,7 +37,7 @@ namespace MCAudioSpectrumAnalyzer
|
||||||
private UdpClient client = new UdpClient(AddressFamily.InterNetwork);
|
private UdpClient client = new UdpClient(AddressFamily.InterNetwork);
|
||||||
private void SetBar(byte index, byte data)
|
private void SetBar(byte index, byte data)
|
||||||
{
|
{
|
||||||
byte value = (byte)((((double)data) / 255) * 80);
|
//byte value = (byte)((((double)data) / 255) * 80);
|
||||||
client.Send(new byte[2] { (byte)(index + 1), data }, 2, new IPEndPoint(IPAddress.Loopback, 5896));
|
client.Send(new byte[2] { (byte)(index + 1), data }, 2, new IPEndPoint(IPAddress.Loopback, 5896));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue