| 1 |
use strict; |
| 2 |
use warnings; |
| 3 |
use FFI::Platypus 2.00; |
| 4 |
|
| 5 |
my($freq, $duration) = @_; |
| 6 |
$freq ||= 750; |
| 7 |
$duration ||= 300; |
| 8 |
|
| 9 |
FFI::Platypus |
| 10 |
->new( api => 2, lib=>[undef], lang => 'Win32' ) |
| 11 |
->function( Beep => ['DWORD','DWORD']=>'BOOL') |
| 12 |
->call($freq, $duration); |