@@ -15,6 +15,10 @@ discard block |
||
15 | 15 | |
16 | 16 | |
17 | 17 | if (!function_exists('PrintHexBytes')) { |
18 | + |
|
19 | + /** |
|
20 | + * @param string $string |
|
21 | + */ |
|
18 | 22 | function PrintHexBytes($string) { |
19 | 23 | $returnstring = ''; |
20 | 24 | for ($i = 0; $i < strlen($string); $i++) { |
@@ -132,6 +136,10 @@ discard block |
||
132 | 136 | } |
133 | 137 | |
134 | 138 | if (!function_exists('fileextension')) { |
139 | + |
|
140 | + /** |
|
141 | + * @param string $filename |
|
142 | + */ |
|
135 | 143 | function fileextension($filename, $numextensions=1) { |
136 | 144 | if (strstr($filename, '.')) { |
137 | 145 | $reversedfilename = strrev($filename); |
@@ -149,6 +157,10 @@ discard block |
||
149 | 157 | } |
150 | 158 | |
151 | 159 | if (!function_exists('RemoveAccents')) { |
160 | + |
|
161 | + /** |
|
162 | + * @param string $string |
|
163 | + */ |
|
152 | 164 | function RemoveAccents($string) { |
153 | 165 | // return strtr($string, '¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ', 'SOZsozYYuAAAAAAACEEEEIIIIDNOOOOOOUUUUYsaaaaaaaceeeeiiiionoooooouuuuyy'); |
154 | 166 | // Revised version by [email protected] |
@@ -233,6 +245,10 @@ discard block |
||
233 | 245 | } |
234 | 246 | |
235 | 247 | if (!function_exists('DecimalBinary2Float')) { |
248 | + |
|
249 | + /** |
|
250 | + * @param string $binarynumerator |
|
251 | + */ |
|
236 | 252 | function DecimalBinary2Float($binarynumerator) { |
237 | 253 | $numerator = Bin2Dec($binarynumerator); |
238 | 254 | $denominator = Bin2Dec(str_repeat('1', strlen($binarynumerator))); |
@@ -241,6 +257,10 @@ discard block |
||
241 | 257 | } |
242 | 258 | |
243 | 259 | if (!function_exists('NormalizeBinaryPoint')) { |
260 | + |
|
261 | + /** |
|
262 | + * @param string $binarypointnumber |
|
263 | + */ |
|
244 | 264 | function NormalizeBinaryPoint($binarypointnumber, $maxbits=52) { |
245 | 265 | // http://www.scri.fsu.edu/~jac/MAD3401/Backgrnd/binary.html |
246 | 266 | if (strpos($binarypointnumber, '.') === false) { |
@@ -321,6 +341,10 @@ discard block |
||
321 | 341 | } |
322 | 342 | |
323 | 343 | if (!function_exists('BigEndian2Float')) { |
344 | + |
|
345 | + /** |
|
346 | + * @param string $byteword |
|
347 | + */ |
|
324 | 348 | function BigEndian2Float($byteword) { |
325 | 349 | // ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic |
326 | 350 | // http://www.psc.edu/general/software/packages/ieee/ieee.html |
@@ -395,6 +419,10 @@ discard block |
||
395 | 419 | } |
396 | 420 | |
397 | 421 | if (!function_exists('BigEndian2Int')) { |
422 | + |
|
423 | + /** |
|
424 | + * @param string $byteword |
|
425 | + */ |
|
398 | 426 | function BigEndian2Int($byteword, $synchsafe=false, $signed=false) { |
399 | 427 | $intvalue = 0; |
400 | 428 | $bytewordlen = strlen($byteword); |
@@ -467,6 +495,10 @@ discard block |
||
467 | 495 | } |
468 | 496 | |
469 | 497 | if (!function_exists('Dec2Bin')) { |
498 | + |
|
499 | + /** |
|
500 | + * @param integer $number |
|
501 | + */ |
|
470 | 502 | function Dec2Bin($number) { |
471 | 503 | while ($number >= 256) { |
472 | 504 | $bytes[] = (($number / 256) - (floor($number / 256))) * 256; |
@@ -752,6 +784,10 @@ discard block |
||
752 | 784 | } |
753 | 785 | |
754 | 786 | if (!function_exists('CloseMatch')) { |
787 | + |
|
788 | + /** |
|
789 | + * @param integer $tolerance |
|
790 | + */ |
|
755 | 791 | function CloseMatch($value1, $value2, $tolerance) { |
756 | 792 | return (abs($value1 - $value2) <= $tolerance); |
757 | 793 | } |
@@ -2239,6 +2275,9 @@ discard block |
||
2239 | 2275 | return true; |
2240 | 2276 | } |
2241 | 2277 | |
2278 | +/** |
|
2279 | + * @param boolean $ScanAsCBR |
|
2280 | + */ |
|
2242 | 2281 | function RecursiveFrameScanning(&$fd, &$ThisFileInfo, &$offset, &$nextframetestoffset, $ScanAsCBR) { |
2243 | 2282 | for ($i = 0; $i < MPEG_VALID_CHECK_FRAMES; $i++) { |
2244 | 2283 | // check next MPEG_VALID_CHECK_FRAMES frames for validity, to make sure we haven't run across a false synch |
@@ -2766,6 +2805,9 @@ discard block |
||
2766 | 2805 | return $MPEGrawHeader; |
2767 | 2806 | } |
2768 | 2807 | |
2808 | +/** |
|
2809 | + * @param integer $padding |
|
2810 | + */ |
|
2769 | 2811 | function MPEGaudioFrameLength(&$bitrate, &$version, &$layer, $padding, &$samplerate) { |
2770 | 2812 | static $AudioFrameLengthCache = array(); |
2771 | 2813 |
@@ -100,6 +100,8 @@ |
||
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
103 | + * @param string|false $TORRENT |
|
104 | + * @param integer $offset |
|
103 | 105 | * @return string|array|int|bool |
104 | 106 | */ |
105 | 107 | public function NextEntity(&$TORRENT, &$offset) { |