Discussions related to Visual Prolog
User avatar
abdelrahman
Posts: 14
Joined: 13 Sep 2009 6:23

How to make vpi 10 play system sounds

Unread post by abdelrahman »

My dear Friends
how to make my program make beep or play a windows system sound in vpi 10 ,
elderly i was using vpi::beep predicate which is retired now ,
I tried to use
platformSupport5x::sound(50, 1000).
but it is not cute ,
Is there any elegant way to use multiple sound beeps with different tones .
User avatar
Thomas Linder Puls
VIP Member
Posts: 1395
Joined: 28 Feb 2000 0:01

Re: How to make vpi 10 play system sounds

Unread post by Thomas Linder Puls »

Well platform5x::sound is just calling environment_native::beep:

Code: Select all

clauses     sound(Duration, Frequency) :-         if 0 = environment_native::beep(Frequency, Duration) then             LastError = exception::getLastError(),             exception::raise_nativeCallException("Beep", LastError, [])         end if.
You can to the same yourself.

However, beeps from computers are really "deprecated". But it is of course up to you.
Regards Thomas Linder Puls
PDC
Harrison Pratt
VIP Member
Posts: 432
Joined: 5 Nov 2000 0:01

Re: How to make vpi 10 play system sounds

Unread post by Harrison Pratt »

vpi:alarm/1 is convenient.
User avatar
Gukalov
VIP Member
Posts: 62
Joined: 5 Oct 2011 15:16

Re: How to make vpi 10 play system sounds

Unread post by Gukalov »

Ohh))) I have a question about system sounds:
How can I ask the system ignore my VIP programm with all this charming system "blum-blam-blim"?!
Thank you in advance...
Post Reply