From: Richard Date: 2007-05-23T05:05:04+09:00 Subject: Re: sleep 0.2 acts more like sleep 1 Hi Cliff, I agree completely, but I didn't know where to get (of how to construct) a longer file. And I'd rather learn a better Ruby technique (as Cliff provided on May 15, for example) than research multimedia issues. But thanks for posting a valid idea. Best wishes, Richard On May 16, 5:11 pm, "Cliff Rowley" wrote: > > -----Original Message----- > > From: Gordon Thiesfeld [mailto:gthiesf...@gmail.com] > > Sent: 15 May 2007 15:45 > > To: ruby-talk ML > > Subject: Re: sleep 0.2 acts more like sleep 1 > > > If I understand your question, you want to play a wav file > > repeatedly, as quickly as possible. This code is from the > > example file in the win32-sound gem. It plays chimes.wav 5 > > times in 3 seconds on both of my XP machines. > > > > > require "win32/sound" > > include Win32 > > > wav = "c:\\windows\\media\\chimes.wav" > > > Sound.play(wav,Sound::ASYNC|Sound::LOOP) > > sleep 3 > > Sound.stop > > > > > > Hope it helps. > > > Gordon > > It would also make sense to me to use a longer sound file. A 3 second sound > file containing 15 beeps, or something.. Seems a little less like brute > force to me, playing the sound only 4 or 5 times in 15 seconds, or > something. > > Just my 2p.