Re: playing sound from within IDL [message #26632] |
Thu, 20 September 2001 15:38 |
Andrew Cool
Messages: 219 Registered: January 1996
|
Senior Member |
|
|
John Votaw wrote:
>
> Does anybody know how to play a portion of a .wav file from within IDL?
> I currently output the substream with write_wav() and then use
> RealPlayer to hear it but this is too cumbersome. I'm running IDL 5.4
> on a windows 2000 pc.
>
> John Votaw
> votaw@commander.eushc.org
Goto to Ronn Kling's website, and suck in Randall Frank's IDL_TOOLS DLM
& DLL
files, which allow asynch sound playing. Certainly works or WIN95/98.
You'll
have to suck it & see on WIN2000...
e.g.
sounddata = READ_WAV(my_WAV_file, rate)
handle = SND_PLAY(sounddata, rate)
If you only want to play a prtion of the WAV file, then why not only
write out
that portion of the array? If you don't know which portion, perhaps you
can PLOT
the array to visually determine the area of interest?
http://www.rlkling.com/freeware/randallfrank.html
But I'm no expert in matters sound - you may wish to wait for an Audio
Guru
to respond ;-)
Andrew
------------------------------------------------------------ ---------
Andrew D. Cool .->-.
Electromagnetics & Propagation Group `-<-'
Surveillance Systems Division Transmitted on
Defence Science & Technology Organisation 100% recycled
PO Box 1500, Salisbury electrons
South Australia 5108
Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
Email : andrew.cool@dsto.defence.gov.au
------------------------------------------------------------ ---------
|
|
|