soundvision/UnityProject/Assets/Scripts/PdConnection/DspController.cs

25 lines
474 B
C#
Raw Normal View History

2019-10-05 04:15:15 +00:00
namespace cylvester
{
public interface IDspController
{
bool State { set; }
}
public class DspController : IDspController
{
2019-10-05 12:18:52 +00:00
private IPdSender sender_;
2019-10-05 04:15:15 +00:00
2019-10-05 12:18:52 +00:00
public DspController(IPdSender sender)
2019-10-05 04:15:15 +00:00
{
2019-10-05 12:18:52 +00:00
sender_ = sender;
2019-10-05 04:15:15 +00:00
}
public bool State
{
set
{
2019-10-05 12:18:52 +00:00
sender_.Send (new[]{(byte)PdMessage.Dsp, (byte)(value?1:0)});
2019-10-05 04:15:15 +00:00
}
}
}
}