process .wav file?

M

mike re-v

I would like to play a very short sound effect( .wav
file )
repeatedly.
############################################
aFile = File.new("foo.wav", "r")
# ... process the file

aFile.close
###########################################
the above code is found in pickaxe pg 108
I can r/w regex loop, count words, or characters in a
txt file. Where would you suggest I look to play the
.wav (process) the file using Ruby?
Thanks
re-v


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree
 
B

Bill Kelly

Hi,

From: "mike re-v said:
I would like to play a very short sound effect( .wav
file )
repeatedly.
############################################
aFile = File.new("foo.wav", "r")
# ... process the file

aFile.close
###########################################
the above code is found in pickaxe pg 108
I can r/w regex loop, count words, or characters in a
txt file. Where would you suggest I look to play the
.wav (process) the file using Ruby?

Have a look at: http://www.ruby-talk.org/55423


Hope this helps,

Bill
 
Z

Zachary P. Landau

--/9DWx/yDrRhgMJTb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Sorry I should have specified linux platform
I've looked at the RAA several keywd searches
like 1.) sound i/o
2)i/o sound linux
3).wav
I don't see anything relative.
I'm probably not using RAA correctly
please advise
thanks
re-v

It won't be very cross-platform, but since it is a wav, you can just
open /dev/dsp and write directly to that. Wav files are basically
just audio dumps, so that usually works.

--=20
Zachary P. Landau <[email protected]>
GPG: gpg --recv-key 0x24E5AD99 | http://kapheine.hypa.net/kapheine.asc

--/9DWx/yDrRhgMJTb
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/rISJCwWyMCTlrZkRAgDZAJ4+HVavr1iKtWb5Y45wz7zZt4ViIQCcDfni
/hFGojGoJqYy3I7+BJp4NZM=
=itDK
-----END PGP SIGNATURE-----

--/9DWx/yDrRhgMJTb--
 
G

gabriele renzi

the above code is found in pickaxe pg 108
I can r/w regex loop, count words, or characters in a
txt file. Where would you suggest I look to play the
wav (process) the file using Ruby?
Thanks
re-v
________

I think Ruby SDL bindings could work..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top