Play audio file

Hi all,

Does anyone have idea which gem/plug in is used to play audio file under
Vista?

Thanks,

Li

···

--
Posted via http://www.ruby-forum.com/.

Li Chen wrote:

Hi all,

Does anyone have idea which gem/plug in is used to play audio file under
Vista?

Thanks,

Li

There's a gem called win32-sound that's suitable for playing wav files. I assume this uses the win32 API function for playing wav files, so it should work on vista. If you require anything more complex, you could try the Ruby SDL bindings but win32-sound looks fine for playing simple wav files.

···

--
Michael Morin
Guide to Ruby

Become an About.com Guide: beaguide.about.com
About.com is part of the New York Times Company

Michael Morin wrote:

There's a gem called win32-sound that's suitable for playing wav files.
  I assume this uses the win32 API function for playing wav files, so it
should work on vista. If you require anything more complex, you could
try the Ruby SDL bindings but win32-sound looks fine for playing simple
wav files.

Thank you very much and it works quite well.

I need to play several short audio files and have two more questions:
    1) Is it possible to set up the time interval between each file?
    2) I want to print out title for each file. What I find is that it
plays all the files then print all the file name or either way. Can
it play 1st file followed by the file name, then 2nd file by the file
name...?

Li

···

--
Posted via http://www.ruby-forum.com/\.