hope to make a sound when my program is finished

#1
Dear-

In XP and Windows7, I used simple R command

system("c:\\sndrec32 /embedding /play c:\\Myfile\\sound12.wav", wait=FALSE)

to make a sound whenever some program is stopped.

HOWEVER under Windows 10, it does NOT work.
It might be because there is NO sndrec32 in Windows 10.
If I move it from XP to Windows 10, still there is some error

What can I do?

-Jay
 

trinker

ggplot2orBust
#2
The beepr package will likely work. Has different sounds you can try:

Code:
if (!require("pacman")) install.packages("pacman")
pacman::p_load(beepr)
beep()

beep("mario")
Or to play a wave file:

Code:
if (!require("pacman")) install.packages("pacman")
pacman::p_load(tuneR)

play("http://static1.grsites.com/archive/sounds/musical/musical038.wav")