Page 1 of 1

How to make vpi 10 play system sounds

Posted: 9 Dec 2021 1:13
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 .

Re: How to make vpi 10 play system sounds

Posted: 9 Dec 2021 9:16
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.

Re: How to make vpi 10 play system sounds

Posted: 9 Dec 2021 13:18
by Harrison Pratt
vpi:alarm/1 is convenient.

Re: How to make vpi 10 play system sounds

Posted: 8 Jan 2022 18:57
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...