Export more functions and add corresponding tests
[audio-opusfile.git] / t / Audio-Opusfile.t
index 8ef7793f4a08c3f770f84ebc5257684fdeee0ebd..8398a06f4028f7531b4065ebbd8c1d62bd1b3330 100644 (file)
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 23;
+use Test::More tests => 29;
 BEGIN { use_ok('Audio::Opusfile') };
 
 my $fail = 0;
@@ -62,3 +62,16 @@ seek $fh, 0, 0;
 read $fh, $buf, 20000;
 $of = Audio::Opusfile->new_from_memory($buf);
 is $of->tags->query('TITLE'), 'Cellule', 'new_from_memory + query';
+
+is $of->pcm_tell, 0, '->pcm_tell is 0 at the beginning';
+
+$of->set_dither_enabled(0);
+my ($li, @samples) = $of->read;
+is $li, 0, '->read, correct link';
+is scalar @samples, 1208, '->read, got correct number of samples';
+
+isn::t $of->pcm_tell, 0, '->pcm_tell is not 0 after read';
+$of->raw_seek(0);
+is $of->pcm_tell, 0, '->pcm_tell is 0 right after raw_seek';
+my @samples = $of->read_float_stereo;
+is scalar @samples, 1208, '->read_float_stereo, got correct number of samples';
This page took 0.009824 seconds and 4 git commands to generate.