I did change a few your procedure
TUOSDemoForm.CreateFrenquencies() because I had bad sound (did not find why yet, maybe because the freq was too short)
// FreqAmpArray[Cnt].Freq := 10 + (Random(4) * 10); this was changed
FreqAmpArray[Cnt].Freq := 440 + (Random(10) * 10); // with this
And for the creation + play the buffer:
function DSPfillbuffer(var Data: TuosF_Data; var fft: TuosF_FFT): TDArFloat;
begin
result := UOSDemoForm.SinData;
end;
procedure TUOSDemoForm.CreatePlayer();
var
Stat: Boolean;
begin
PlayerIndex := SPPlayer.Value;
Stat := uos_CreatePlayer(PlayerIndex);
if(Stat) then
begin
InputIndex := uos_AddFromEndlessMuted(PlayerIndex, 1, length(SinData) ); // used as template
uos_InputAddDSP(PlayerIndex, InputIndex, nil, @DSPfillbuffer, nil, nil); // DSP to fill the buffer at each loop
OutputIndex := uos_AddIntoDevOut(PlayerIndex, -1, -1, SamplingFrequency , 1, 0, length(SinData), -1); // this to get sound
uos_Play(PlayerIndex);
end
else
MLog.Append('Error with Player: ' + PlayerIndex.ToString);
end;
With this I get a correct sine-wave (but of course it is only to test and to give some ideas).
The zip of the project is included [EDIT: The zip was updated].