
This function creates a WaveOut object the first form opens the specified wave file (see also Open() ), so you can directly Play() it. FUNCTIONS new Win32::Sound::WaveOut(FILENAME) new Win32::Sound::WaveOut(SAMPLERATE, BITS, CHANNELS) new Win32::Sound::WaveOut() It has methods to load and then play WAV files, with the additional feature of specifying the start and end range, so you can play only a portion of an audio file.įurthermore, it is possible to load arbitrary binary data to the soundcard to let it play and save them back into WAV files in a few words, you can do some sound synthesis work. Win32::Sound also provides a different, more powerful approach to wave audio data with its WaveOut package.

If( not defined Win32::Sound::Volume() ) \n" THE WaveOut PACKAGE

In case of error, returns undef and sets $!.Įxamples: ($L, $R) = Win32::Sound::Volume() Otherwise, returns a single 32 bit value (left in the low word, right in the high word). Returns the wave device volume if called in an array context, returns left and right values. By default, any new call to the function will stop previously playing sounds. If a sound is already playing, the function fails. If the specified sound cannot be found, the function returns without playing anything. The sound plays repeatedly until it is stopped. The sound is played asynchronously and the function returns immediately after beginning the sound (if this flag is not specified, the sound is played synchronously and the function returns when the sound ends).

If no parameters are given, this function stops the sound actually playing (see also Win32::Sound::Stop).įLAGS can be a combination of the following constants: SND_ASYNC Plays the specified sound: SOUND can the be name of a WAV file or one of the following predefined sound names: SystemDefaultĪdditionally, if the named sound could not be found, the function plays the system default sound (unless you specify the SND_NODEFAULT flag). and read on for more fun -) FUNCTIONS Win32::Sound::Play(SOUND, ) Win32::Sound - An extension to play with Windows sounds SYNOPSIS use Win32::Sound
