Administrator
|
This post was updated on .
Hello.
If you want to cross-fade (start playing before end of song), you may use a DSP:
uos_InputSetPositionEnable(PlayerIndex1, InputIndex1, 1);
uos_InputAddDSP(PlayerIndex1, InputIndex1, nil, @CrossFadeDSP nil, nil);
And CrossFadeDSP function will be something like:
function CrossFadeDSP(Data: TuosF_Data; fft: TuosF_FFT): TDArFloat;
begin
if uos_InputPosition(PlayerIndex, InputIndex) > uos_InputLength(PlayerIndex, InputIndex) - whenmuststart
then uos_Play(2);
end;
----------------
You may use also LoopEndProc:
uos_InputSetPositionEnable(PlayerIndex1, InputIndex1, 1);
uos_LoopEndProc(PlayerIndex 1, CrossFadeLoop);
Here example for CrossFadeLoop:
Procedure CrossFadeLoop;
begin
if uos_InputPosition(PlayerIndex, InputIndex) > uos_InputLength(PlayerIndex, InputIndex) - whenmuststart
then uos_Play(2);
end;
Fre;D
|