Sound under windows

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
thx,
jf

You might want to look at VRuby.
There exists one demo called mediatest. That might
just be what you want.

Alternatively using the OLE-stuff you might be able
to control an external Windows-program.

Bye,
-A.

···

Am Samstag, 9. November 2002 12:48 schrieb 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
thx,
jf


Armin Roehrl, http://www.approximity.com
Training, Development and Mentoring
OOP, XP, Java, Ruby, Smalltalk, .Net, Datamining, Parallel computing,
Webservices

How could you do all that?
I did not know it was hard.
–??

here is the link:
http://www.threeweb.ad.jp/~nyasu/vruby/samples-e.html
search for mp3, wav, or avi.

···

Am Samstag, 9. November 2002 12:48 schrieb 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
thx,
jf

-A.


Armin Roehrl, http://www.approximity.com
Training, Development and Mentoring
OOP, XP, Java, Ruby, Smalltalk, .Net, Datamining, Parallel computing,
Webservices

How could you do all that?
I did not know it was hard.
–??

Hi,

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

···

From: “MENON Jean-Francois” jean-francois.menon@meteo.fr

Bill Kelly wrote:

Hi,

From: “MENON Jean-Francois” jean-francois.menon@meteo.fr

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

thank you very much :->
I don’t know if it is planned for future releases of Ruby, but I think
it would be good to have a standard (platform independent) way to play
wav files with ruby.

regards,
jf