comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Re: playing sound files

Re: playing sound files
type: item
description: Jason Jonikas <jjonikas@bos.fti-net.com> wrote: > Does any one know a good way of playing sounds in IDL other than > spawning to the windows wav player. I had been toying with the idea of > reading in all of the wav files at the begining of the program and then > writing an IDL wav player but I cant find a good description of the wav > file format. Any ideas would be a great help. Hi Jason, I could send you a really trivial little IDL / C-external routine to play .wav files if you like. (Email me at p.mason@syd.dem.csiro.au if you want it.) The routine calls the Win32 multimedia function PlaySound() directly, so it's more to-the-point than spawning a separate media player program. But I get the impression, somehow, that this is not quite what you're looking for. After all it's still going to have to open and load a .wav file before playing it, so it's not going to be as quick as these things can get. If response time is an issue for you, the simplest solution I can think of (assuming you have a fixed set of .WAV files) would be to bung the .wav files you want to play straight into your call-external DLL as binary resources (this is easy). With hardly any extra effort you could get PlaySound() to play these resources - bound to be quicker than separate .wav files. The "real thing", though, would involve pre-loading the .wav files into arrays (in memory), and using the lower-level multimedia routines. I hope this helps, Peter Mason -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
creator: menakkis
date: 1999-05-03T07:00:00-00:00