Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

generer un son

6 réponses
Avatar
vic
Bonjour, j'aimerais savoir comment generer un son avec le haut parleur (un
son que je definit par une valeur hexa) en c++ sous windows 98.
Merci d'avance.

6 réponses

Avatar
Christian ASTOR
vic a écrit:
Bonjour, j'aimerais savoir comment generer un son avec le haut parleur (un
son que je definit par une valeur hexa) en c++ sous windows 98.



void Beep9x(long nFreq, long nMillisec)
{
int nRead;
long nTone = 1193280 / nFreq;
_outp(0x43, 0xB6);
_outp(0x42, LOBYTE(nTone));
_outp(0x42, HIBYTE(nTone));
nRead = _inp(0x61);
_outp(0x61, nRead | 0x03);
Sleep(nMillisec);
nRead = _inp(0x61);
_outp(0x61, nRead & 0xFC);
}
Avatar
patrox
BOOL Beep(
DWORD dwFreq, // sound frequency
DWORD dwDuration // sound duration
);


pat.
Avatar
Christian ASTOR
patrox a écrit:
BOOL Beep(
DWORD dwFreq, // sound frequency
DWORD dwDuration // sound duration
);



Sous *98*, il a dit le monsieur...
Avatar
Flzw
> > BOOL Beep(
> DWORD dwFreq, // sound frequency
> DWORD dwDuration // sound duration
> );

Sous *98*, il a dit le monsieur...




Client: Included in Windows XP, Windows 2000 Professional, Windows NT
Workstation, Windows Me, Windows 98, and Windows 95.
Avatar
Christian ASTOR
Flzw a écrit:

BOOL Beep(
DWORD dwFreq, // sound frequency
DWORD dwDuration // sound duration
);



Sous *98*, il a dit le monsieur...





Client: Included in Windows XP, Windows 2000 Professional, Windows NT
Workstation, Windows Me, Windows 98, and Windows 95.



dwFreq
Windows Me/98/95: The Beep function ignores this parameter.

dwDuration
Windows Me/98/95: The Beep function ignores this parameter.
Avatar
Flzw
> dwFreq
Windows Me/98/95: The Beep function ignores this parameter.

dwDuration
Windows Me/98/95: The Beep function ignores this parameter.



autant pour moi.