Skip to content

Commit

Permalink
Release 1.4.1. Fixed latency for cpu arm.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredvs committed Oct 3, 2017
1 parent 94eb311 commit 6293053
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 79 deletions.
9 changes: 7 additions & 2 deletions src/commander.pas
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,14 @@ procedure tcommanderfo.onsetinput(const Sender: TObject);
begin
// writeln('ok create');
TButton(Sender).tag := 1;


{$if defined(cpuarm)}
OutputIndex4 := uos_AddIntoDevOut(theinput, -1, 0.3, -1,
-1, 0, -1);
{$else}
OutputIndex4 := uos_AddIntoDevOut(theinput);

{$ENDIF}

// writeln('OutputIndex4 = ' + inttostr(OutputIndex4));
// uos_outputsetenable(theinput,OutputIndex4,true);

Expand Down
16 changes: 12 additions & 4 deletions src/drums.pas
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,13 @@ procedure tdrumsfo.createdrumsplayers;

if uos_AddFromEndlessMuted(i, channels, 512) > -1 then
// this for a dummy endless input, must be last input

if uos_AddIntoDevOut(i, -1, -1, -1, -1, 2, 512) > -1 then
{$if defined(cpuarm)}
if uos_AddIntoDevOut(i, -1, 0.3, -1, -1, 2, 512) > -1 then
{$else}
if uos_AddIntoDevOut(i, -1, -1, -1, -1, 2, 512) > -1 then
{$endif}


begin

uos_InputAddDSPVolume(i, drum_input[i], 1, 1);
Expand Down Expand Up @@ -831,8 +836,11 @@ procedure tdrumsfo.createvoiceplayers;
if uos_AddFromEndlessMuted(i, channels, 512) > -1 then
// this for a dummy endless input, must be last input

uos_AddIntoDevOut(i, -1, -1, -1, -1, 2, 512);

{$if defined(cpuarm)}
uos_AddIntoDevOut(i, -1, 0.3, -1, -1, 2, 512);
{$else}
uos_AddIntoDevOut(i, -1, -1, -1, -1, 2, 512);
{$endif}
end;
tag := 1;
if timerisenabled = True then
Expand Down
22 changes: 19 additions & 3 deletions src/guitars.pas
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,34 @@ procedure tguitarsfo.doguitarstring(const Sender: TObject);
begin
if uos_CreatePlayer(TButton(Sender).tag + 9) then
if uos_AddFromFile(TButton(Sender).tag + 9, (PChar(aguitar[TButton(Sender).tag - 1]))) > -1 then
if uos_AddIntoDevOut(TButton(Sender).tag + 9) > -1 then

{$if defined(cpuarm)}
if uos_AddIntoDevOut(TButton(Sender).tag + 9, -1, 0.3, -1, -1, -1, -1) > -1 then
{$else}
if uos_AddIntoDevOut(TButton(Sender).tag + 9) > -1 then
{$endif}

uos_Play(TButton(Sender).tag + 9);
end
else
begin
if (aguitarisplaying[TButton(Sender).tag - 1] = False) then


begin
TButton(Sender).face.fade_direction := gd_up;
TButton(Sender).face.fade_color.items[1] := cl_ltgreen;

if uos_CreatePlayer(TButton(Sender).tag + 9) then
if uos_AddFromFile(TButton(Sender).tag + 9, (PChar(aguitar[TButton(Sender).tag - 1]))) > -1 then
if uos_AddIntoDevOut(TButton(Sender).tag + 9) > -1 then

if uos_AddFromFile(TButton(Sender).tag + 9, (PChar(aguitar[TButton(Sender).tag - 1]))) > -1 then

{$if defined(cpuarm)}
if uos_AddIntoDevOut(TButton(Sender).tag + 9, -1, 0.3, -1, -1, -1, -1) > -1 then
{$else}
if uos_AddIntoDevOut(TButton(Sender).tag + 9) > -1 then
{$endif}

begin
uos_Play(TButton(Sender).tag + 9, -1);
aguitarisplaying[TButton(Sender).tag - 1] := True;
Expand Down
19 changes: 18 additions & 1 deletion src/recorder.pas
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,19 @@ procedure trecorderfo.doplayerstart(const Sender: TObject);
isrecording := false;
// OutputIndex3 := uos_AddIntoDevOut(PlayerIndex3) ;
//// add a Output into device with default parameters


{$if defined(cpuarm)}
OutputIndex3 := uos_AddIntoDevOut(therecplayer, -1, 0.3, uos_InputGetSampleRate(therecplayer, InputIndex3),
uos_InputGetChannels(therecplayer, InputIndex3), samformat, 1024);

{$else}
OutputIndex3 := uos_AddIntoDevOut(therecplayer, -1, -1, uos_InputGetSampleRate(therecplayer, InputIndex3),
uos_InputGetChannels(therecplayer, InputIndex3), samformat, 1024);

{$endif}


//// add a Output into device with custom parameters
//////////// PlayerIndex : Index of a existing Player
//////////// Device ( -1 is default Output device )
Expand Down Expand Up @@ -598,7 +609,13 @@ procedure trecorderfo.dorecorderstart(const Sender: TObject);
if bsavetofile.Value then
uos_AddIntoFile(therecplayer, PChar(ansistring(historyfn.Value)));

OutputIndex3 := uos_AddIntoDevOut(therecplayer);
{$if defined(cpuarm)}
OutputIndex3 := uos_AddIntoDevOut(therecplayer,-1, 0.3, -1, -1, -1, -1) ;
{$else}
OutputIndex3 := uos_AddIntoDevOut(therecplayer);
{$endif}


uos_outputsetenable(therecplayer, OutputIndex3, blistenin.Value);

InputIndex3 := uos_AddFromDevIn(therecplayer);
Expand Down
10 changes: 9 additions & 1 deletion src/songplayer.pas
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,16 @@ procedure tsongplayerfo.doplayerstart(const Sender: TObject);
begin
// Outputindex1 := uos_AddIntoDevOut(Playerindex1) ;
//// add a Output into device with default parameters
Outputindex1 := uos_AddIntoDevOut(theplayer, -1, -1, uos_InputGetSampleRate(theplayer, Inputindex1),
{$if defined(cpuarm)}
Outputindex1 := uos_AddIntoDevOut(theplayer, -1, 0.3, uos_InputGetSampleRate(theplayer, Inputindex1),
uos_InputGetChannels(theplayer, Inputindex1), samformat, 1024);
{$else}
Outputindex1 := uos_AddIntoDevOut(theplayer, -1, -1, uos_InputGetSampleRate(theplayer, Inputindex1),
uos_InputGetChannels(theplayer, Inputindex1), samformat, 1024);
{$ENDIF}



//// add a Output into device with custom parameters
//////////// PlayerIndex : Index of a existing Player
//////////// Device ( -1 is default Output device )
Expand Down
10 changes: 9 additions & 1 deletion src/songplayer2.pas
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,16 @@ procedure tsongplayer2fo.doplayerstart(const Sender: TObject);
// writeln('ok index');
// Outputindex2 := uos_AddIntoDevOut(Playerindex2) ;
//// add a Output into device with default parameters
Outputindex2 := uos_AddIntoDevOut(theplayer2, -1, -1, uos_InputGetSampleRate(theplayer2, Inputindex2),

{$if defined(cpuarm)}
Outputindex2 := uos_AddIntoDevOut(theplayer2, -1, 0.3, uos_InputGetSampleRate(theplayer2, Inputindex2),
uos_InputGetChannels(theplayer2, Inputindex2), samformat, 1024);

{$else}
Outputindex2 := uos_AddIntoDevOut(theplayer2, -1, -1, uos_InputGetSampleRate(theplayer2, Inputindex2),
uos_InputGetChannels(theplayer2, Inputindex2), samformat, 1024);
{$endif}

//// add a Output into device with custom parameters
//////////// PlayerIndex : Index of a existing Player
//////////// Device ( -1 is default Output device )
Expand Down
Loading

0 comments on commit 6293053

Please sign in to comment.