[SPIP] v3.2.1-->v3.2.3
[lhc/web/www.git] / www / plugins-dist / medias / lib / getid3 / module.audio.mpc.php
index 14e829d..6d7c851 100644 (file)
@@ -1,11 +1,11 @@
 <?php
+
 /////////////////////////////////////////////////////////////////
 /// getID3() by James Heinrich <info@getid3.org>               //
-//  available at http://getid3.sourceforge.net                 //
-//            or http://www.getid3.org                         //
-//          also https://github.com/JamesHeinrich/getID3       //
-/////////////////////////////////////////////////////////////////
-// See readme.txt for more details                             //
+//  available at https://github.com/JamesHeinrich/getID3       //
+//            or https://www.getid3.org                        //
+//            or http://getid3.sourceforge.net                 //
+//  see readme.txt for more details                            //
 /////////////////////////////////////////////////////////////////
 //                                                             //
 // module.audio.mpc.php                                        //
@@ -17,7 +17,9 @@
 
 class getid3_mpc extends getid3_handler
 {
-
+       /**
+        * @return bool
+        */
        public function Analyze() {
                $info = &$this->getid3->info;
 
@@ -56,10 +58,11 @@ class getid3_mpc extends getid3_handler
                        return false;
 
                }
-               return false;
        }
 
-
+       /**
+        * @return bool
+        */
        public function ParseMPCsv8() {
                // this is SV8
                // http://trac.musepack.net/trac/wiki/SV8Specification
@@ -208,6 +211,9 @@ class getid3_mpc extends getid3_handler
                return true;
        }
 
+       /**
+        * @return bool
+        */
        public function ParseMPCsv7() {
                // this is SV7
                // http://www.uni-jena.de/~pfk/mpp/sv8/header.html
@@ -322,6 +328,9 @@ class getid3_mpc extends getid3_handler
                return true;
        }
 
+       /**
+        * @return bool
+        */
        public function ParseMPCsv6() {
                // this is SV4 - SV6
 
@@ -397,7 +406,11 @@ class getid3_mpc extends getid3_handler
                return true;
        }
 
-
+       /**
+        * @param int $profileid
+        *
+        * @return string
+        */
        public function MPCprofileNameLookup($profileid) {
                static $MPCprofileNameLookup = array(
                        0  => 'no profile',
@@ -420,6 +433,11 @@ class getid3_mpc extends getid3_handler
                return (isset($MPCprofileNameLookup[$profileid]) ? $MPCprofileNameLookup[$profileid] : 'invalid');
        }
 
+       /**
+        * @param int $frequencyid
+        *
+        * @return int|string
+        */
        public function MPCfrequencyLookup($frequencyid) {
                static $MPCfrequencyLookup = array(
                        0 => 44100,
@@ -430,6 +448,11 @@ class getid3_mpc extends getid3_handler
                return (isset($MPCfrequencyLookup[$frequencyid]) ? $MPCfrequencyLookup[$frequencyid] : 'invalid');
        }
 
+       /**
+        * @param int $intvalue
+        *
+        * @return float|false
+        */
        public function MPCpeakDBLookup($intvalue) {
                if ($intvalue > 0) {
                        return ((log10($intvalue) / log10(2)) - 15) * 6;
@@ -437,6 +460,11 @@ class getid3_mpc extends getid3_handler
                return false;
        }
 
+       /**
+        * @param int $encoderversion
+        *
+        * @return string
+        */
        public function MPCencoderVersionLookup($encoderversion) {
                //Encoder version * 100  (106 = 1.06)
                //EncoderVersion % 10 == 0        Release (1.0)
@@ -464,6 +492,13 @@ class getid3_mpc extends getid3_handler
                return number_format($encoderversion / 100, 2).' alpha';
        }
 
+       /**
+        * @param string $data
+        * @param int    $packetLength
+        * @param int    $maxHandledPacketLength
+        *
+        * @return int|false
+        */
        public function SV8variableLengthInteger($data, &$packetLength, $maxHandledPacketLength=9) {
                $packet_size = 0;
                for ($packetLength = 1; $packetLength <= $maxHandledPacketLength; $packetLength++) {
@@ -488,6 +523,11 @@ class getid3_mpc extends getid3_handler
                return $packet_size;
        }
 
+       /**
+        * @param string $packetKey
+        *
+        * @return string
+        */
        public function MPCsv8PacketName($packetKey) {
                static $MPCsv8PacketName = array();
                if (empty($MPCsv8PacketName)) {