JWhy je peux plier (héhé) | tu peux en effet jouer avec le beep du PC grace a la fonction... beep (facile ) qui est une API windows:
Code :
- BOOL Beep(
- DWORD dwFreq, // sound frequency, in hertz
- DWORD dwDuration // sound duration, in milliseconds
- );
- dwFreq
- Windows NT:
- Specifies the frequency, in hertz, of the sound. This parameter must be in the range 37 through 32,767 (0x25 through 0x7FFF).
- Windows 95:
- The parameter is ignored.
- dwDuration
- Windows NT:
- Specifies the duration, in milliseconds, of the sound.
- Windows 95:
- The parameter is ignored.
|
et tu pourras faire de jolis sons comme celui ci:
Code :
- procedure TForm1.Button1Click(Sender: TObject);
- const
- cFREQ=500;
- cT1=350;
- cT2=cT1 div 2;
- begin
- Windows.beep(cFREQ,cT1);
- Windows.beep(cFREQ,cT1);
- Windows.beep(cFREQ,cT2);
- Windows.beep(cFREQ,cT2);
- Windows.beep(cFREQ,cT1);
- Windows.beep(cFREQ,cT2);
- Windows.beep(cFREQ,cT2);
- Windows.beep(cFREQ,cT2);
- Windows.beep(cFREQ,cT1);
- Windows.beep(cFREQ,cT2);
- Windows.beep(cFREQ,cT2);
- end;
|
cependant, le plus simple est peut etre de récuperer les 12 sons qui composent le clavier du telephone (0..9, *, #) au format .WAV et de les jouer avec l'API PlaySound de l'unité MMSystem ... [edit]--Message édité par JWhy--[/edit] ---------------
www.alliancefrancophone.org ... Home is where the heart is
|