From: Bill Kelly Date: 2002-11-10T03:26:09+09:00 Subject: Re: sound under windows Hi, From: "MENON Jean-Francois" > hello, > what is the good way for output simple sounds with Ruby under windows ? > I looked in the RAA but it seems to be only libs for linux One way is to use Win32API: SND_MEMORY = 0x00000004 # from "mmsystem.h" SND_FILENAME = 0x00020000 PlaySound = Win32API.new("winmm", "PlaySound", ['P', 'L', 'L'], 'I') # play from file: PlaySound.call("C:/your/sound.wav", 0, SND_FILENAME) # play from memory: wav = File.open("C:/your/sound.wav", File::RDONLY) {|f| f.binmode; f.read } PlaySound.call(wav, 0, SND_MEMORY) HTH, Bill