Hello, this code works fine:
PlaySound('C:\MyWavFolder\sample1.wav', 0, SND_ASYNC);
I have Lazarus 1.2.6 and fpc 2.6.4.
When I try to compile this code:path_and_name:='folder\sample' + IntToStr(i) + '.wav';
PlaySound(path_and_name, 0, SND_ASYNC);
I got the following error message:
unit1.pas(236,20) Error: Incompatible type for arg no. 1: Got "AnsiString", expected "PChar"