function TPlayerA.MinMaxR(x, min, max: extended): extended;
begin
if x < min then Result := min
else if x > max then Result := max
else Result := x;
end;
procedure TPlayerA.SetPitch (value : float);
var
freq : Integer;
s : single;
begin
s := ((Value*(wavefreq / 100) )+ wavefreq);
freq :=Trunc( MinMaxr(s,100,100000));
BASS_ChannelSetAttributes(Channel, freq, -1, -1);
end;
/////////////////////////////////////////////////////
function TPlayerA.GetPitch : float;
var
handle, freq, volume : DWORD; Pan : Integer;s: Integer;
begin
BASS_ChannelGetAttributes(Channel, freq, volume, Pan);
Result := (freq - wavefreq)/(wavefreq / 100);
end;
Chris