From 33fac129d4e945160adac31b73dd04e90d78bc50 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 18 Sep 2016 00:46:20 +0100 Subject: [PATCH] Add doc too --- lib/Audio/Opusfile.pm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/lib/Audio/Opusfile.pm b/lib/Audio/Opusfile.pm index e0546ba..1e37f4b 100644 --- a/lib/Audio/Opusfile.pm +++ b/lib/Audio/Opusfile.pm @@ -132,6 +132,22 @@ Creates a new Audio::Opusfile object from an Ogg Opus file. Dies if the given file does not exist or is not a valid Ogg Opus file. +=item Audio::Opusfile->B(I<$buffer>) + +Creates a new Audio::Opusfile object from a buffer containing Ogg Opus +data. + +Dies if the given buffer does not contain valid data. + +=item Audio::Opusfile::test(I<$buffer>) + +Returns true if the given buffer looks like the beginning of a valid +Ogg Opus file, false otherwise. + +Dies if the given buffer does not have sufficient data to tell if it +is an Opus stream or if it looks like a Opus stream but parsing it +failed. + =item B<$of>->head Returns an L object corresponding to the file. @@ -140,6 +156,25 @@ Returns an L object corresponding to the file. Returns an L object corresponding to the file. +=item B<$of>->seekable + +Returns whether or not the data source being read is seekable. + +=item B<$of>->link_count + +Returns the number of links in this chained stream. Always returns 1 +for unseekable sources. + +=item B<$of>->serialno([I<$link_index>]) + +Get the serial number of the given link in a (possibly-chained) Ogg +Opus stream. If the given index is greater than the total number of +links, this returns the serial number of the last link. + +If the source is not seekable, I<$link_index> is negative, or +I<$link_index> is not given, then this function returns the serial +number of the current link. + =back =head1 EXPORT -- 2.39.2