Forum: PC-Programmierung Sound Beep Generator mit C++


von Thomas (Gast)


Lesenswert?

Hallo, kennt jmd eine Funktion oder ein Tipp wie man das machen könnte?

Gruß, Thomas

von Rufus Τ. F. (rufus) Benutzerseite


Lesenswert?

Dazu gibt's 'ne Win32-API-Funktion namens Beep. Die steuert den 
PC-Lautsprecher an:
1
Beep
2
The Beep function generates simple tones on the speaker. The function 
3
is synchronous; it does not return control to its caller until the 
4
sound finishes. 
5
6
BOOL Beep(
7
  DWORD dwFreq,      // sound frequency
8
  DWORD dwDuration   // sound duration
9
);
10
11
Parameters
12
dwFreq 
13
[in] Specifies the frequency, in hertz, of the sound. This parameter 
14
must be in the range 37 through 32,767 (0x25 through 0x7FFF). 
15
Windows 95/98/Me: The Beep function ignores this parameter. 
16
17
dwDuration 
18
[in] Specifies the duration, in milliseconds, of the sound. 
19
Windows 95/98/Me: The Beep function ignores this parameter.

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.