Sound with IDL... HELP! [message #25550] |
Wed, 27 June 2001 07:27  |
Alex Schuster
Messages: 124 Registered: February 1997
|
Senior Member |
|
|
Okay, okay. I'm calm. Everything's just fine. I'm sure, someone will
tell me that I don't have a BIG, BIG problem.
Because, hey, it's 2001, and of course it should be no problem to play
.wav files from IDL, right? Right.
When I do a
spawn, 'wav.exe mywav.wav' ,
a big DOS window opens. If I use
spawn, 'start /min wav.exe mywav.wav' ,
it closes immedeately, but it is still opened first for a short time.
I also see a small dialog telling me that IDL is spawning a command.
And this is just unacceptable! I want to show images to our patients
which are being tested, and I just cannot confuse them with appearing
and disappearing dialogs. No way.
Any ideas? If not, I really don't know what to do now. And I have to
explain the doctors why the program I wrote this week is of no use.
Alex
--
Alex Schuster Wonko@planet-interkom.de
alex@pet.mpin-koeln.mpg.de
|
|
|
|
Re: Sound with IDL... HELP! [message #25652 is a reply to message #25550] |
Thu, 28 June 2001 11:13  |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
"Alex Schuster" <Wonko@planet-interkom.de> wrote in message
news:3B39ED36.DD579CF2@planet-interkom.de...
> Okay, okay. I'm calm. Everything's just fine. I'm sure, someone will
> tell me that I don't have a BIG, BIG problem.
>
> Because, hey, it's 2001, and of course it should be no problem to play
> .wav files from IDL, right? Right.
Hi Alex,
David's absolutely right about IDL 5.4 and Spawn, but if all you need is to
get a .wav file sound played from the PC, you might want to try the
excellent idl_tools utilities by Randall Frank. One of the many marvels in
there is a sound player. It's available at:
http://www.rlkling.com/freeware/randallfrank.html
Then, once you've dropped idl_tools.dll and idl_tools.dlm into your IDL
\bin\bin.x86 directory, all you need to do is:
wav = Read_WAV('c:\winnt\media\chimes.wav', rate)
handle = Snd_Play(wav, rate)
(handle is not anything you need afterward, ignore it)
From what I can tell, Read_WAV came in IDL 5.3, so this may be possible
without the 5.4 upgrade, and you may prefer to have it all handled from
within IDL!
Cheers,
--
-Dick
Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
|
|
|