@@ -795,6 +795,9 @@ discard block |
||
| 795 | 795 | |
| 796 | 796 | // from getid3.lib.php |
| 797 | 797 | |
| 798 | + /** |
|
| 799 | + * @param double $floatnumber |
|
| 800 | + */ |
|
| 798 | 801 | function trunc($floatnumber) { |
| 799 | 802 | // truncates a floating-point number at the decimal point |
| 800 | 803 | // returns int (if possible, otherwise float) |
@@ -811,6 +814,9 @@ discard block |
||
| 811 | 814 | return $truncatednumber; |
| 812 | 815 | } |
| 813 | 816 | |
| 817 | + /** |
|
| 818 | + * @param string $byteword |
|
| 819 | + */ |
|
| 814 | 820 | function LittleEndian2Int($byteword) { |
| 815 | 821 | $intvalue = 0; |
| 816 | 822 | $byteword = strrev($byteword); |
@@ -834,11 +840,17 @@ discard block |
||
| 834 | 840 | return $binvalue; |
| 835 | 841 | } |
| 836 | 842 | |
| 843 | + /** |
|
| 844 | + * @param string $rawdata |
|
| 845 | + */ |
|
| 837 | 846 | function FixedPoint2_30($rawdata) { |
| 838 | 847 | $binarystring = $this->BigEndian2Bin($rawdata); |
| 839 | 848 | return $this->Bin2Dec(substr($binarystring, 0, 2)) + (float) ($this->Bin2Dec(substr($binarystring, 2, 30)) / 1073741824); |
| 840 | 849 | } |
| 841 | 850 | |
| 851 | + /** |
|
| 852 | + * @param string $binstring |
|
| 853 | + */ |
|
| 842 | 854 | function Bin2Dec($binstring, $signed=false) { |
| 843 | 855 | $signmult = 1; |
| 844 | 856 | if ($signed) { |