spencoid has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Audio::Wav; use Cwd; use Data::Dumper; my $path = getcwd; my $wav = new Audio::Wav; my $test = 'test.wav'; my $read = $wav -> read($test); my $details = $read -> details(); print Data::Dumper->Dump([ $details ]); my $total = 0; my $buffer = 2; my $length = $read -> length(); while ( $total < $length ) { $total += $buffer; my $data = $read -> read_raw( $buffer ); my $value = unpack('s',$data); my $sample = $total/2; print "\nsample $sample value $value "; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Audio::WAV data problem
by graff (Chancellor) on Apr 19, 2013 at 03:56 UTC | |
by spencoid (Acolyte) on Apr 19, 2013 at 04:35 UTC | |
by graff (Chancellor) on Apr 19, 2013 at 20:21 UTC | |
by spencoid (Acolyte) on Apr 20, 2013 at 06:05 UTC | |
by spencoid (Acolyte) on Apr 19, 2013 at 04:42 UTC | |
by spencoid (Acolyte) on Apr 19, 2013 at 05:34 UTC | |
|
Re: Audio::WAV data problem
by Lotus1 (Vicar) on Apr 19, 2013 at 01:09 UTC | |
by spencoid (Acolyte) on Apr 19, 2013 at 02:06 UTC |