Win32::SoundRec - Module for recording sound on Win32 platforms
use Win32::SoundRec; my $r = Win32::SoundRec->new(); # start recording... $r->record(); # wait 5 seconds sleep(5); # Playback the recording buffer $r->play(); sleep(5); # stop record or playback $r->stop(); # save the recording $r->save('my.wav');
This module allows recording of sound on Win32 platforms using the MCI interface (which depends on winmm.dll).
An MCI compatible soundcard
The new() method is the constructor. It connects to the mci interface.
This method starts recording the audio. After calling the record function, you should sleep() as long as you want to record. The three parameters are optional. $bitspersample defaults to 8, $samplespersec defaults to 11025, $channels defaults to 1.
This method plays back the unsaved recording buffer
This method stops the playback or record action
This methods closes and saves the recording. By default the recording buffer is saved in 'test.wav'. If you specify a valid $filename, the buffer is saved in that file
You can email the author for support on this module.
Jouke Visser firstname.lastname@example.org http://jouke.pvoice.org Based largely on code posted to the perl-win32-users mailinglist by Jeff Slutzky
Copyright (c) 2003-2005 Jouke Visser. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.