Skip to content

Commit

Permalink
All checkboxes replaced by lithning buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredvs committed Nov 21, 2020
1 parent c67db92 commit 97e93b8
Show file tree
Hide file tree
Showing 10 changed files with 8,010 additions and 6,840 deletions.
1,429 changes: 851 additions & 578 deletions src/commander.mfm

Large diffs are not rendered by default.

554 changes: 406 additions & 148 deletions src/commander.pas

Large diffs are not rendered by default.

8,372 changes: 4,282 additions & 4,090 deletions src/commander_mfm.pas

Large diffs are not rendered by default.

221 changes: 128 additions & 93 deletions src/config.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,41 @@
interface

uses
msetypes, mseglob, mseguiglob, mseguiintf, mseapplication, msestat, msemenus,
msegui,uos_flat, msegraphics, msegraphutils, mseevent, mseclasses, msewidgets,
mseforms,mseact, msedataedits, mseedit, mseificomp, mseificompglob,mseifiglob,
msestatfile,msestream, msestrings, SysUtils, msesimplewidgets,msegraphedits,
msescrollbar, msedragglob, msegrids, msegridsglob, msedispwidgets,
mserichstring, msedropdownlist, msecolordialog;
msetypes,
mseglob,
mseguiglob,
mseguiintf,
mseapplication,
msestat,
msemenus,
msegui,
uos_flat,
msegraphics,
msegraphutils,
mseevent,
mseclasses,
msewidgets,
mseforms,
mseact,
msedataedits,
mseedit,
mseificomp,
mseificompglob,
mseifiglob,
msestatfile,
msestream,
msestrings,
SysUtils,
msesimplewidgets,
msegraphedits,
msescrollbar,
msedragglob,
msegrids,
msegridsglob,
msedispwidgets,
mserichstring,
msedropdownlist,
msecolordialog;

type
tconfigfo = class(tmseform)
Expand All @@ -19,41 +48,43 @@ tconfigfo = class(tmseform)
latdrums: trealspinedit;
tbutton1: TButton;
lsuglat: tlabel;
defdevin: tlabel;
defdevout: tlabel;
tbutton2: tbutton;
infos_grid: tstringgrid;
devincfg: tintegeredit;
devoutcfg: tintegeredit;
tgroupbox2: tgroupbox;
tcoloredit1: tcoloredit;
tcoloredit2: tcoloredit;
dbkl1: tbooleanedit;
tgroupbox3: tgroupbox;
dbkl2: tbooleanedit;
tcoloredit12: tcoloredit;
tcoloredit22: tcoloredit;
defdevin: tlabel;
defdevout: tlabel;
tbutton2: TButton;
infos_grid: tstringgrid;
devincfg: tintegeredit;
devoutcfg: tintegeredit;
tgroupbox2: tgroupbox;
tcoloredit1: tcoloredit;
tcoloredit2: tcoloredit;
dbkl1: tbooleanedit;
tgroupbox3: tgroupbox;
dbkl2: tbooleanedit;
tcoloredit12: tcoloredit;
tcoloredit22: tcoloredit;
procedure changelatplay(const Sender: TObject);
procedure changelatdrums(const Sender: TObject);
procedure changelatrec(const Sender: TObject);
procedure onsetcolor();

procedure oncheckdevices(const sender: TObject);
procedure onsetcolor1(const sender: TObject; var avalue: colorty;
var accept: Boolean);
procedure onsetback(const sender: TObject; var avalue: Boolean;
var accept: Boolean);
procedure onchangeback(const sender: TObject);

procedure oncheckdevices(const Sender: TObject);
procedure onsetcolor1(const Sender: TObject; var avalue: colorty; var accept: Boolean);
procedure onsetback(const Sender: TObject; var avalue: Boolean; var accept: Boolean);
procedure onchangeback(const Sender: TObject);
end;

var
configfo: tconfigfo;
devin, devout : integer;
devin, devout: integer;

implementation

uses
spectrum1, waveform, commander, songplayer, config_mfm;
spectrum1,
waveform,
commander,
songplayer,
config_mfm;

procedure tconfigfo.changelatplay(const Sender: TObject);
begin
Expand All @@ -70,89 +101,93 @@ procedure tconfigfo.changelatrec(const Sender: TObject);
/// if latrec.value < 0 then latrec.value := -1;
end;

procedure tconfigfo.oncheckdevices(const sender: TObject);
procedure tconfigfo.oncheckdevices(const Sender: TObject);
var
x : integer;
x: integer;
begin
UOS_GetInfoDevice();
infos_grid.rowcount := UOSDeviceCount;
UOS_GetInfoDevice();
infos_grid.rowcount := UOSDeviceCount;
x := 0;

while x < UOSDeviceCount do
begin
infos_grid[0][x] := IntToStr(UOSDeviceInfos[x].DeviceNum);
infos_grid[1][x] := UOSDeviceInfos[x].DeviceName;
if UOSDeviceInfos[x].DefaultDevIn = True then
infos_grid[2][x] := 'Yes'
else
infos_grid[2][x] := 'No';

if UOSDeviceInfos[x].DefaultDevOut = True then
infos_grid[3][x] := 'Yes'
else
infos_grid[3][x] := 'No';

infos_grid[4][x] := IntToStr(UOSDeviceInfos[x].ChannelsIn);
infos_grid[5][x] := IntToStr(UOSDeviceInfos[x].ChannelsOut);
infos_grid[6][x] := floattostrf(UOSDeviceInfos[x].SampleRate, ffFixed, 15, 0);
infos_grid[7][x] := floattostrf(UOSDeviceInfos[x].LatencyHighIn, ffFixed, 15, 8);
infos_grid[8][x] := floattostrf(UOSDeviceInfos[x].LatencyHighOut, ffFixed, 15, 8);
infos_grid[9][x] := floattostrf(UOSDeviceInfos[x].LatencyLowIn, ffFixed, 15, 8);
infos_grid[10][x] := floattostrf(UOSDeviceInfos[x].LatencyLowOut, ffFixed, 15, 8);
infos_grid[11][x] := UOSDeviceInfos[x].HostAPIName;
infos_grid[12][x] := UOSDeviceInfos[x].DeviceType;
Inc(x);
end;
begin
infos_grid[0][x] := IntToStr(UOSDeviceInfos[x].DeviceNum);
infos_grid[1][x] := UOSDeviceInfos[x].DeviceName;
if UOSDeviceInfos[x].DefaultDevIn = True then
infos_grid[2][x] := 'Yes'
else
infos_grid[2][x] := 'No';

if UOSDeviceInfos[x].DefaultDevOut = True then
infos_grid[3][x] := 'Yes'
else
infos_grid[3][x] := 'No';

infos_grid[4][x] := IntToStr(UOSDeviceInfos[x].ChannelsIn);
infos_grid[5][x] := IntToStr(UOSDeviceInfos[x].ChannelsOut);
infos_grid[6][x] := floattostrf(UOSDeviceInfos[x].SampleRate, ffFixed, 15, 0);
infos_grid[7][x] := floattostrf(UOSDeviceInfos[x].LatencyHighIn, ffFixed, 15, 8);
infos_grid[8][x] := floattostrf(UOSDeviceInfos[x].LatencyHighOut, ffFixed, 15, 8);
infos_grid[9][x] := floattostrf(UOSDeviceInfos[x].LatencyLowIn, ffFixed, 15, 8);
infos_grid[10][x] := floattostrf(UOSDeviceInfos[x].LatencyLowOut, ffFixed, 15, 8);
infos_grid[11][x] := UOSDeviceInfos[x].HostAPIName;
infos_grid[12][x] := UOSDeviceInfos[x].DeviceType;
Inc(x);
end;
end;

procedure tconfigfo.onsetcolor();
begin
spectrum1fo.tchartleft.traces[0].color := tcoloredit1.value;
spectrum1fo.tchartright.traces[0].color := tcoloredit2.value;
spectrum2fo.tchartleft.traces[0].color := tcoloredit12.value;
spectrum2fo.tchartright.traces[0].color := tcoloredit22.value;
commanderfo.vuleft.bar_face.fade_color.items[0] := configfo.tcoloredit1.value;
commanderfo.vuleft2.bar_face.fade_color.items[0] := configfo.tcoloredit12.value;
commanderfo.vuright.bar_face.fade_color.items[0] := configfo.tcoloredit2.value;
commanderfo.vuright2.bar_face.fade_color.items[0] := configfo.tcoloredit22.value;
songplayerfo.vuleft.bar_face.fade_color.items[0] := configfo.tcoloredit1.value;
songplayer2fo.vuleft.bar_face.fade_color.items[0] := configfo.tcoloredit12.value;
songplayerfo.vuright.bar_face.fade_color.items[0] := configfo.tcoloredit2.value;
songplayer2fo.vuright.bar_face.fade_color.items[0] := configfo.tcoloredit22.value;

if dbkl1.value then
wavefo.trackbar1.scrollbar.face1.template := songplayerfo.tfacegreendark
else wavefo.trackbar1.scrollbar.face1.template := songplayerfo.tfacegreen;

if dbkl2.value then
wavefo2.trackbar1.scrollbar.face1.template := songplayerfo.tfacegreendark
else wavefo2.trackbar1.scrollbar.face1.template := songplayerfo.tfacegreen;

if dbkl1.value then
songplayerfo.trackbar1.scrollbar.face1.template := songplayerfo.tfacegreendark
else songplayerfo.trackbar1.scrollbar.face1.template := songplayerfo.tfacegreen;

if dbkl2.value then
songplayer2fo.trackbar1.scrollbar.face1.template := songplayerfo.tfacegreendark
else songplayer2fo.trackbar1.scrollbar.face1.template := songplayerfo.tfacegreen;
spectrum1fo.tchartleft.traces[0].color := tcoloredit1.Value;
spectrum1fo.tchartright.traces[0].color := tcoloredit2.Value;
spectrum2fo.tchartleft.traces[0].color := tcoloredit12.Value;
spectrum2fo.tchartright.traces[0].color := tcoloredit22.Value;
commanderfo.vuleft.bar_face.fade_color.items[0] := configfo.tcoloredit1.Value;
commanderfo.vuleft2.bar_face.fade_color.items[0] := configfo.tcoloredit12.Value;
commanderfo.vuright.bar_face.fade_color.items[0] := configfo.tcoloredit2.Value;
commanderfo.vuright2.bar_face.fade_color.items[0] := configfo.tcoloredit22.Value;
songplayerfo.vuleft.bar_face.fade_color.items[0] := configfo.tcoloredit1.Value;
songplayer2fo.vuleft.bar_face.fade_color.items[0] := configfo.tcoloredit12.Value;
songplayerfo.vuright.bar_face.fade_color.items[0] := configfo.tcoloredit2.Value;
songplayer2fo.vuright.bar_face.fade_color.items[0] := configfo.tcoloredit22.Value;

if dbkl1.Value then
wavefo.trackbar1.scrollbar.face1.template := commanderfo.tfacegreendark
else
wavefo.trackbar1.scrollbar.face1.template := commanderfo.tfacegreen;

if dbkl2.Value then
wavefo2.trackbar1.scrollbar.face1.template := commanderfo.tfacegreendark
else
wavefo2.trackbar1.scrollbar.face1.template := commanderfo.tfacegreen;

if dbkl1.Value then
songplayerfo.trackbar1.scrollbar.face1.template := commanderfo.tfacegreendark
else
songplayerfo.trackbar1.scrollbar.face1.template := commanderfo.tfacegreen;

if dbkl2.Value then
songplayer2fo.trackbar1.scrollbar.face1.template := commanderfo.tfacegreendark
else
songplayer2fo.trackbar1.scrollbar.face1.template := commanderfo.tfacegreen;

end;

procedure tconfigfo.onsetcolor1(const sender: TObject; var avalue: colorty;
var accept: Boolean);
procedure tconfigfo.onsetcolor1(const Sender: TObject; var avalue: colorty; var accept: Boolean);
begin
//onsetcolor;
//onsetcolor;
end;

procedure tconfigfo.onsetback(const sender: TObject; var avalue: Boolean;
var accept: Boolean);
procedure tconfigfo.onsetback(const Sender: TObject; var avalue: Boolean; var accept: Boolean);
begin
//onsetcolor;
//onsetcolor;
end;

procedure tconfigfo.onchangeback(const sender: TObject);
procedure tconfigfo.onchangeback(const Sender: TObject);
begin
onsetcolor;
onsetcolor;
end;


end.

Loading

0 comments on commit 97e93b8

Please sign in to comment.