17 Jun 2005 06:41:36 UTC
- Distribution: Win32-SoundRec
- Module version: 0.02
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (2)
- Testers (3 / 2 / 0)
- KwaliteeBus factor: 0
- % Coverage
- License: unknown
- Download (10.19KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
- SEE ALSO
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 email@example.com 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.
Module Install Instructions
To install Win32::SoundRec, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Win32::SoundRec
For more information on module installation, please visit the detailed CPAN module installation guide.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|