Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Chr(7) and the PC Speaker
Message
From
15/01/2003 13:37:16
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00742016
Message ID:
00742037
Views:
19
This message has been marked as the solution to the initial question of the thread.
>I need to have the PC beep a set of tones (The PC has no audio card/speakers).
>In the DOS version of the program I'm converting, I had this routine that worked well:
>
>procedure Tone
>parameters nFrequency,nDuration
>@ 0,0 say ""
>if empty(parameters())
>    set bell to 512,2    && no parameters - reset
>else
>    set bell to nFrequency,nDuration
>    ?? chr(7)
>endif
>
>
>Is there a way to force the output to the PC's internal speaker?
>
>TIA

I don't think you can if there's a sound card installed.

But maybe you can use the Beep API function instead:
DECLARE Beep IN WIN32API INTEGER nFrequency, INTEGER nDuration
Beep(1000,250)
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform