Autor Beitrag
boozzz
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 66

Win XP, Win 2000, SuSe Linux

BeitragVerfasst: Di 07.02.06 18:47 
Hi, um eine WAV-Datei abzuspielen habe ich folgenden Programmausschnitt geschrieben:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure sound_abspielen;
var flag:word;
begin
  flag:=SND_ASYNC;
  sndPlaySound(PChar(sound.wav),flag);
end;


Zusätzlich habe ich uses MMSystem; eingefügt.
Leider funktioniert es nicht. Fehlermeldung in Zeile 5 "Undefinierter Bezeichner 'Sound'".

Könnte mir bitte jemand sagen warum es nicht funzt?

Danke,
boozzz
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8548
Erhaltene Danke: 477

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Di 07.02.06 19:15 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure sound_abspielen;
var flag:word;
begin
  flag:=SND_ASYNC;
  sndPlaySound(PChar('sound.wav'),flag);
end;
Sound.wav ist ein String, und den muss man in Hochkommata setzen.

_________________
We are, we were and will not be.