Add doc too
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 17 Sep 2016 23:46:20 +0000 (00:46 +0100)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 17 Sep 2016 23:46:20 +0000 (00:46 +0100)
lib/Audio/Opusfile.pm

index e0546ba435f09e2a77f964735c3c909697c5010a..1e37f4bf580365be25e235f844006c34b05cacf7 100644 (file)
@@ -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<new_from_memory>(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<Audio::Opusfile::Head> object corresponding to the file.
@@ -140,6 +156,25 @@ Returns an L<Audio::Opusfile::Head> object corresponding to the file.
 
 Returns an L<Audio::Opusfile::Tags> 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
This page took 0.01044 seconds and 4 git commands to generate.