[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

play audio file

Li Chen

9/2/2008 2:58:00 PM

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-....

2 Answers

Michael Morin

9/2/2008 4:29:00 PM

0

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
http://ruby....
Become an About.com Guide: beaguide.about.com
About.com is part of the New York Times Company

Li Chen

9/2/2008 4:59:00 PM

0

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-....