Jouke Visser > Win32-SoundRec-0.02 > Win32::SoundRec

Download:
Win32-SoundRec-0.02.tar.gz

Dependencies

Annotate this POD

Related Modules

Win32::API
Win32::Sound
Win32::GUI
Win32::OLE
more...
By perlmonks.org

CPAN RT

New  2
Open  0
View/Report Bugs
Module Version: 0.02   Source  

NAME ^

Win32::SoundRec - Module for recording sound on Win32 platforms

SYNOPSIS ^

    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');

DESCRIPTION ^

This module allows recording of sound on Win32 platforms using the MCI interface (which depends on winmm.dll).

PREREQUISITES ^

An MCI compatible soundcard

USAGE ^

new()

The new() method is the constructor. It connects to the mci interface.

record([$bitspersample, $samplespersec, $channels])

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.

play

This method plays back the unsaved recording buffer

stop

This method stops the playback or record action

save([$filename])

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

SUPPORT ^

You can email the author for support on this module.

AUTHOR ^

        Jouke Visser
        jouke@cpan.org
        http://jouke.pvoice.org

    Based largely on code posted to the perl-win32-users mailinglist by Jeff Slutzky

COPYRIGHT ^

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.

SEE ALSO ^

perl(1).

syntax highlighting: