mirror of
https://github.com/jwetzell/qController.git
synced 2026-08-19 14:14:22 +00:00
Reinstate Audio Level updating and sliders
This commit is contained in:
@@ -16,17 +16,38 @@ namespace qController
|
||||
public QController(string address, int port)
|
||||
{
|
||||
qClient = new QClient(address, port);
|
||||
|
||||
qUpdater = new QUpdater(this);
|
||||
qUpdater.Start();
|
||||
|
||||
qClient.qParser.SelectedCueUpdated += this.OnSelectedCueUpdated;
|
||||
qClient.qParser.WorkspaceUpdated += this.OnWorkspaceUpdated;
|
||||
qClient.qParser.PlaybackPositionUpdated += this.OnPlaybackPositionUpdated;
|
||||
qClient.qParser.CueInfoUpdated += this.OnCueUpdateReceived;
|
||||
qClient.qParser.AudioLevelsUpdated += this.OnAudioLevelsUpdated;
|
||||
qClient.sendArgsUDP("/updates", 1);
|
||||
qClient.sendArgsUDP("/updates", 1);
|
||||
qClient.sendAndReceiveString("/cueLists");
|
||||
|
||||
}
|
||||
|
||||
private void OnAudioLevelsUpdated(object source, AudioLevelArgs args)
|
||||
{
|
||||
if(qWorkspace != null)
|
||||
qWorkspace.UpdateLevels(args.cue_id, args.levels);
|
||||
}
|
||||
|
||||
public void Connect()
|
||||
{
|
||||
qClient.sendStringUDP("/connect");
|
||||
}
|
||||
|
||||
public void Disconnect()
|
||||
{
|
||||
qClient.sendStringUDP("/disconnect");
|
||||
}
|
||||
|
||||
public void ConnectWithPass(string pass)
|
||||
{
|
||||
qClient.sendArgsUDP("/connect", pass);
|
||||
}
|
||||
|
||||
public void sendCommand(string cmd){
|
||||
@@ -34,7 +55,7 @@ namespace qController
|
||||
}
|
||||
|
||||
public void updateCueValue(QCue cue, string property, object newValue){
|
||||
// qSender.sendArgs("/cue_id/"+cue.uniqueID+"/"+property, newValue);
|
||||
//qClient.sendArgs("/cue_id/"+cue.uniqueID+"/"+property, newValue);
|
||||
}
|
||||
|
||||
public void OnSelectedCueUpdated(object source, CueEventArgs args)
|
||||
@@ -66,7 +87,13 @@ namespace qController
|
||||
{
|
||||
playbackPosition = args.Cue.uniqueID;
|
||||
}
|
||||
if(args.Cue.type == "Audio" || args.Cue.type == "Mic" || args.Cue.type == "Video")
|
||||
{
|
||||
Console.WriteLine("Cue has audio levels...sending request");
|
||||
qClient.sendStringUDP("/cue_id/" + args.Cue.uniqueID + "/levels");
|
||||
}
|
||||
}
|
||||
|
||||
public void Kill(){
|
||||
qUpdater.Kill();
|
||||
qClient.Close();
|
||||
|
||||
Reference in New Issue
Block a user