Try this instead:
procedure bass_playsample(filename: string);
var
f: string;
uf: UnicodeString;
hc: HCHANNEL;
begin
f := ExpandFileName(filename);
if (FileExists(f) = True) then
begin
uf := f;
global_bass_hs := BASS_SampleLoad(False, PWideChar(uf), 0, 0, 1, BASS_SAMPLE_OVER_POS or BASS_UNICODE);
if (global_bass_hs = 0) then
begin
Application.MessageBox(PChar(IntToStr(BASS_ErrorGetCode())), 'error sample loading, error code: ', MB_ICONERROR);
Exit();
end;
hc := BASS_SampleGetChannel(global_bass_hs, False);
BASS_ChannelPlay(hc, False);
end
else
begin
Application.MessageBox(PChar(f), 'file does not exist', MB_ICONERROR);
end;
end;