X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=t%2FAudio-Opusfile.t;fp=t%2FAudio-Opusfile.t;h=8398a06f4028f7531b4065ebbd8c1d62bd1b3330;hb=318673cc096ad920881afd23088a68f766902734;hp=8ef7793f4a08c3f770f84ebc5257684fdeee0ebd;hpb=60230f2b006a6ece40b2b700110d2241ef65bf5d;p=audio-opusfile.git diff --git a/t/Audio-Opusfile.t b/t/Audio-Opusfile.t index 8ef7793..8398a06 100644 --- a/t/Audio-Opusfile.t +++ b/t/Audio-Opusfile.t @@ -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';