Changeset 46112 for trunk/src/wp-includes/ID3/module.audio-video.riff.php
- Timestamp:
- 09/14/2019 07:06:09 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ID3/module.audio-video.riff.php
r41196 r46112 1 1 <?php 2 2 3 ///////////////////////////////////////////////////////////////// 3 4 /// getID3() by James Heinrich <info@getid3.org> // 4 // available at http://getid3.sourceforge.net // 5 // or http://www.getid3.org // 6 // also https://github.com/JamesHeinrich/getID3 // 7 ///////////////////////////////////////////////////////////////// 8 // See readme.txt for more details // 5 // available at https://github.com/JamesHeinrich/getID3 // 6 // or https://www.getid3.org // 7 // or http://getid3.sourceforge.net // 8 // see readme.txt for more details // 9 9 ///////////////////////////////////////////////////////////////// 10 10 // // … … 28 28 getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio.dts.php', __FILE__, true); 29 29 30 class getid3_riff extends getid3_handler {31 30 class getid3_riff extends getid3_handler 31 { 32 32 protected $container = 'riff'; // default 33 33 34 /** 35 * @return bool 36 * 37 * @throws getid3_exception 38 */ 34 39 public function Analyze() { 35 40 $info = &$this->getid3->info; … … 47 52 $thisfile_riff_audio = &$thisfile_riff['audio']; 48 53 $thisfile_riff_video = &$thisfile_riff['video']; 54 $thisfile_riff_WAVE = array(); 49 55 50 56 $Original['avdataoffset'] = $info['avdataoffset']; … … 358 364 $thisfile_riff_WAVE_cart_0['url'] = trim(substr($thisfile_riff_WAVE_cart_0['data'], 748, 1024)); 359 365 $thisfile_riff_WAVE_cart_0['tag_text'] = explode("\r\n", trim(substr($thisfile_riff_WAVE_cart_0['data'], 1772))); 366 $thisfile_riff['comments']['tag_text'][] = substr($thisfile_riff_WAVE_cart_0['data'], 1772); 360 367 361 368 $thisfile_riff['comments']['artist'][] = $thisfile_riff_WAVE_cart_0['artist']; … … 406 413 'category' =>'genre', 407 414 'cdtitle' =>'album', 408 'tracktitle'=>'title',409 415 ); 410 416 foreach ($tagmapping as $fromkey => $tokey) { … … 614 620 $thisfile_video['dataformat'] = 'avi'; 615 621 622 $thisfile_riff_video_current = array(); 623 616 624 if (isset($thisfile_riff[$RIFFsubtype]['movi']['offset'])) { 617 625 $info['avdataoffset'] = $thisfile_riff[$RIFFsubtype]['movi']['offset'] + 8; … … 696 704 'copyrighted' => 0x00020010, 697 705 ); 698 706 foreach ($flags as $flag => $value) { 699 707 $thisfile_riff_raw_avih['flags'][$flag] = (bool) ($thisfile_riff_raw_avih['dwFlags'] & $value); 700 708 } … … 702 710 // shortcut 703 711 $thisfile_riff_video[$streamindex] = array(); 712 /** @var array $thisfile_riff_video_current */ 704 713 $thisfile_riff_video_current = &$thisfile_riff_video[$streamindex]; 705 714 … … 868 877 } 869 878 870 if (isset($thisfile_riff_raw_strf_strhfccType_streamindex ['fourcc'])) {879 if (isset($thisfile_riff_raw_strf_strhfccType_streamindex) && isset($thisfile_riff_raw_strf_strhfccType_streamindex['fourcc'])) { 871 880 872 881 $thisfile_video['fourcc'] = $thisfile_riff_raw_strf_strhfccType_streamindex['fourcc']; … … 915 924 case 'CDDA': 916 925 $info['fileformat'] = 'cda'; 917 926 unset($info['mime_type']); 918 927 919 928 $thisfile_audio_dataformat = 'cda'; … … 935 944 $thisfile_riff_CDDA_fmt_0['start_offset_seconds'] = (float) $thisfile_riff_CDDA_fmt_0['start_offset_frame'] / 75; 936 945 $thisfile_riff_CDDA_fmt_0['playtime_seconds'] = (float) $thisfile_riff_CDDA_fmt_0['playtime_frames'] / 75; 937 $info['comments']['track ']= $thisfile_riff_CDDA_fmt_0['track_num'];946 $info['comments']['track_number'] = $thisfile_riff_CDDA_fmt_0['track_num']; 938 947 $info['playtime_seconds'] = $thisfile_riff_CDDA_fmt_0['playtime_seconds']; 939 948 … … 948 957 break; 949 958 950 959 // http://en.wikipedia.org/wiki/AIFF 951 960 case 'AIFF': 952 961 case 'AIFC': … … 1058 1067 getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.tag.id3v2.php', __FILE__, true); 1059 1068 $getid3_temp = new getID3(); 1060 $getid3_temp->openfile($this->getid3->filename );1069 $getid3_temp->openfile($this->getid3->filename, null, $this->getid3->fp); 1061 1070 $getid3_id3v2 = new getid3_id3v2($getid3_temp); 1062 1071 $getid3_id3v2->StartingOffset = $thisfile_riff[$RIFFsubtype]['ID3 '][0]['offset'] + 8; … … 1078 1087 $thisfile_audio['bits_per_sample'] = 8; 1079 1088 $thisfile_audio['channels'] = 1; // overridden below, if need be 1089 $ActualBitsPerSample = 0; 1080 1090 1081 1091 if (isset($thisfile_riff[$RIFFsubtype]['BODY'][0]['offset'])) { … … 1115 1125 1116 1126 default: 1117 $this->warning('Unexpected sCompression value in 8SVX.VHDR chunk - expecting 0 or 1, found "'. sCompression.'"');1127 $this->warning('Unexpected sCompression value in 8SVX.VHDR chunk - expecting 0 or 1, found "'.$thisfile_riff_RIFFsubtype_VHDR_0['sCompression'].'"'); 1118 1128 break; 1119 1129 } … … 1160 1170 1161 1171 $getid3_temp = new getID3(); 1162 $getid3_temp->openfile($this->getid3->filename );1172 $getid3_temp->openfile($this->getid3->filename, null, $this->getid3->fp); 1163 1173 $getid3_mpeg = new getid3_mpeg($getid3_temp); 1164 1174 $getid3_mpeg->Analyze(); … … 1246 1256 1247 1257 $getid3_temp = new getID3(); 1248 $getid3_temp->openfile($this->getid3->filename );1258 $getid3_temp->openfile($this->getid3->filename, null, $this->getid3->fp); 1249 1259 $getid3_id3v2 = new getid3_id3v2($getid3_temp); 1250 1260 $getid3_id3v2->StartingOffset = $thisfile_riff[$RIFFsubtype]['id3 '][0]['offset'] + 8; … … 1373 1383 } 1374 1384 1385 /** 1386 * @param int $startoffset 1387 * @param int $maxoffset 1388 * 1389 * @return array|false 1390 * 1391 * @throws Exception 1392 * @throws getid3_exception 1393 */ 1375 1394 public function ParseRIFFAMV($startoffset, $maxoffset) { 1376 1395 // AMV files are RIFF-AVI files with parts of the spec deliberately broken, such as chunk size fields hardcoded to zero (because players known in hardware that these fields are always a certain size … … 1481 1500 } 1482 1501 1483 1502 /** 1503 * @param int $startoffset 1504 * @param int $maxoffset 1505 * 1506 * @return array|false 1507 * @throws getid3_exception 1508 */ 1484 1509 public function ParseRIFF($startoffset, $maxoffset) { 1485 1510 $info = &$this->getid3->info; … … 1530 1555 if (getid3_mp3::MPEGaudioHeaderBytesValid($FirstFourBytes)) { 1531 1556 $getid3_temp = new getID3(); 1532 $getid3_temp->openfile($this->getid3->filename );1557 $getid3_temp->openfile($this->getid3->filename, null, $this->getid3->fp); 1533 1558 $getid3_temp->info['avdataoffset'] = $this->ftell() - 4; 1534 1559 $getid3_temp->info['avdataend'] = $this->ftell() + $AudioChunkSize; … … 1552 1577 // AC3 1553 1578 $getid3_temp = new getID3(); 1554 $getid3_temp->openfile($this->getid3->filename );1579 $getid3_temp->openfile($this->getid3->filename, null, $this->getid3->fp); 1555 1580 $getid3_temp->info['avdataoffset'] = $this->ftell() - 4; 1556 1581 $getid3_temp->info['avdataend'] = $this->ftell() + $AudioChunkSize; … … 1613 1638 if (getid3_mp3::MPEGaudioHeaderBytesValid(substr($testData, 0, 4))) { 1614 1639 $getid3_temp = new getID3(); 1615 $getid3_temp->openfile($this->getid3->filename );1640 $getid3_temp->openfile($this->getid3->filename, null, $this->getid3->fp); 1616 1641 $getid3_temp->info['avdataoffset'] = $info['avdataoffset']; 1617 1642 $getid3_temp->info['avdataend'] = $info['avdataend']; … … 1630 1655 $getid3_temp = new getID3(); 1631 1656 if ($isRegularAC3) { 1632 $getid3_temp->openfile($this->getid3->filename );1657 $getid3_temp->openfile($this->getid3->filename, null, $this->getid3->fp); 1633 1658 $getid3_temp->info['avdataoffset'] = $info['avdataoffset']; 1634 1659 $getid3_temp->info['avdataend'] = $info['avdataend']; … … 1664 1689 // This is probably DTS data 1665 1690 $getid3_temp = new getID3(); 1666 $getid3_temp->openfile($this->getid3->filename );1691 $getid3_temp->openfile($this->getid3->filename, null, $this->getid3->fp); 1667 1692 $getid3_temp->info['avdataoffset'] = $info['avdataoffset']; 1668 1693 $getid3_dts = new getid3_dts($getid3_temp); … … 1732 1757 // break; 1733 1758 1759 case 'scot': 1760 // https://cmsdk.com/node-js/adding-scot-chunk-to-wav-file.html 1761 $RIFFchunk[$chunkname][$thisindex]['data'] = $this->fread($chunksize); 1762 $RIFFchunk[$chunkname][$thisindex]['parsed']['alter'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 0, 1); 1763 $RIFFchunk[$chunkname][$thisindex]['parsed']['attrib'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 1, 1); 1764 $RIFFchunk[$chunkname][$thisindex]['parsed']['artnum'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 2, 2)); 1765 $RIFFchunk[$chunkname][$thisindex]['parsed']['title'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 4, 43); // "name" in other documentation 1766 $RIFFchunk[$chunkname][$thisindex]['parsed']['copy'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 47, 4); 1767 $RIFFchunk[$chunkname][$thisindex]['parsed']['padd'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 51, 1); 1768 $RIFFchunk[$chunkname][$thisindex]['parsed']['asclen'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 52, 5); 1769 $RIFFchunk[$chunkname][$thisindex]['parsed']['startseconds'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 57, 2)); 1770 $RIFFchunk[$chunkname][$thisindex]['parsed']['starthundredths'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 59, 2)); 1771 $RIFFchunk[$chunkname][$thisindex]['parsed']['endseconds'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 61, 2)); 1772 $RIFFchunk[$chunkname][$thisindex]['parsed']['endhundreths'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 63, 2)); 1773 $RIFFchunk[$chunkname][$thisindex]['parsed']['sdate'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 65, 6); 1774 $RIFFchunk[$chunkname][$thisindex]['parsed']['kdate'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 71, 6); 1775 $RIFFchunk[$chunkname][$thisindex]['parsed']['start_hr'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 77, 1); 1776 $RIFFchunk[$chunkname][$thisindex]['parsed']['kill_hr'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 78, 1); 1777 $RIFFchunk[$chunkname][$thisindex]['parsed']['digital'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 79, 1); 1778 $RIFFchunk[$chunkname][$thisindex]['parsed']['sample_rate'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 80, 2)); 1779 $RIFFchunk[$chunkname][$thisindex]['parsed']['stereo'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 82, 1); 1780 $RIFFchunk[$chunkname][$thisindex]['parsed']['compress'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 83, 1); 1781 $RIFFchunk[$chunkname][$thisindex]['parsed']['eomstrt'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 84, 4)); 1782 $RIFFchunk[$chunkname][$thisindex]['parsed']['eomlen'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 88, 2)); 1783 $RIFFchunk[$chunkname][$thisindex]['parsed']['attrib2'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 90, 4)); 1784 $RIFFchunk[$chunkname][$thisindex]['parsed']['future1'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 94, 12); 1785 $RIFFchunk[$chunkname][$thisindex]['parsed']['catfontcolor'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 106, 4)); 1786 $RIFFchunk[$chunkname][$thisindex]['parsed']['catcolor'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 110, 4)); 1787 $RIFFchunk[$chunkname][$thisindex]['parsed']['segeompos'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 114, 4)); 1788 $RIFFchunk[$chunkname][$thisindex]['parsed']['vt_startsecs'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 118, 2)); 1789 $RIFFchunk[$chunkname][$thisindex]['parsed']['vt_starthunds'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 120, 2)); 1790 $RIFFchunk[$chunkname][$thisindex]['parsed']['priorcat'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 122, 3); 1791 $RIFFchunk[$chunkname][$thisindex]['parsed']['priorcopy'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 125, 4); 1792 $RIFFchunk[$chunkname][$thisindex]['parsed']['priorpadd'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 129, 1); 1793 $RIFFchunk[$chunkname][$thisindex]['parsed']['postcat'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 130, 3); 1794 $RIFFchunk[$chunkname][$thisindex]['parsed']['postcopy'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 133, 4); 1795 $RIFFchunk[$chunkname][$thisindex]['parsed']['postpadd'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 137, 1); 1796 $RIFFchunk[$chunkname][$thisindex]['parsed']['hrcanplay'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 138, 21); 1797 $RIFFchunk[$chunkname][$thisindex]['parsed']['future2'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 159, 108); 1798 $RIFFchunk[$chunkname][$thisindex]['parsed']['artist'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 267, 34); 1799 $RIFFchunk[$chunkname][$thisindex]['parsed']['comment'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 301, 34); // "trivia" in other documentation 1800 $RIFFchunk[$chunkname][$thisindex]['parsed']['intro'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 335, 2); 1801 $RIFFchunk[$chunkname][$thisindex]['parsed']['end'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 337, 1); 1802 $RIFFchunk[$chunkname][$thisindex]['parsed']['year'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 338, 4); 1803 $RIFFchunk[$chunkname][$thisindex]['parsed']['obsolete2'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 342, 1); 1804 $RIFFchunk[$chunkname][$thisindex]['parsed']['rec_hr'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 343, 1); 1805 $RIFFchunk[$chunkname][$thisindex]['parsed']['rdate'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 344, 6); 1806 $RIFFchunk[$chunkname][$thisindex]['parsed']['mpeg_bitrate'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 350, 2)); 1807 $RIFFchunk[$chunkname][$thisindex]['parsed']['pitch'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 352, 2)); 1808 $RIFFchunk[$chunkname][$thisindex]['parsed']['playlevel'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 354, 2)); 1809 $RIFFchunk[$chunkname][$thisindex]['parsed']['lenvalid'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 356, 1); 1810 $RIFFchunk[$chunkname][$thisindex]['parsed']['filelength'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 357, 4)); 1811 $RIFFchunk[$chunkname][$thisindex]['parsed']['newplaylevel'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 361, 2)); 1812 $RIFFchunk[$chunkname][$thisindex]['parsed']['chopsize'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 363, 4)); 1813 $RIFFchunk[$chunkname][$thisindex]['parsed']['vteomovr'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 367, 4)); 1814 $RIFFchunk[$chunkname][$thisindex]['parsed']['desiredlen'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 371, 4)); 1815 $RIFFchunk[$chunkname][$thisindex]['parsed']['triggers'] = getid3_lib::LittleEndian2Int(substr($RIFFchunk[$chunkname][$thisindex]['data'], 375, 4)); 1816 $RIFFchunk[$chunkname][$thisindex]['parsed']['fillout'] = substr($RIFFchunk[$chunkname][$thisindex]['data'], 379, 33); 1817 1818 foreach (array('title', 'artist', 'comment') as $key) { 1819 if (trim($RIFFchunk[$chunkname][$thisindex]['parsed'][$key])) { 1820 $info['riff']['comments'][$key] = array($RIFFchunk[$chunkname][$thisindex]['parsed'][$key]); 1821 } 1822 } 1823 if ($RIFFchunk[$chunkname][$thisindex]['parsed']['filelength'] && !empty($info['filesize']) && ($RIFFchunk[$chunkname][$thisindex]['parsed']['filelength'] != $info['filesize'])) { 1824 $this->warning('RIFF.WAVE.scot.filelength ('.$RIFFchunk[$chunkname][$thisindex]['parsed']['filelength'].') different from actual filesize ('.$info['filesize'].')'); 1825 } 1826 break; 1827 1734 1828 default: 1735 if (!empty($LISTchunkParent) && (($RIFFchunk[$chunkname][$thisindex]['offset'] + $RIFFchunk[$chunkname][$thisindex]['size']) <= $LISTchunkMaxOffset)) {1829 if (!empty($LISTchunkParent) && isset($LISTchunkMaxOffset) && (($RIFFchunk[$chunkname][$thisindex]['offset'] + $RIFFchunk[$chunkname][$thisindex]['size']) <= $LISTchunkMaxOffset)) { 1736 1830 $RIFFchunk[$LISTchunkParent][$chunkname][$thisindex]['offset'] = $RIFFchunk[$chunkname][$thisindex]['offset']; 1737 1831 $RIFFchunk[$LISTchunkParent][$chunkname][$thisindex]['size'] = $RIFFchunk[$chunkname][$thisindex]['size']; … … 1768 1862 } 1769 1863 1864 /** 1865 * @param string $RIFFdata 1866 * 1867 * @return bool 1868 */ 1770 1869 public function ParseRIFFdata(&$RIFFdata) { 1771 1870 $info = &$this->getid3->info; … … 1805 1904 } 1806 1905 1906 /** 1907 * @param array $RIFFinfoArray 1908 * @param array $CommentsTargetArray 1909 * 1910 * @return bool 1911 */ 1807 1912 public static function parseComments(&$RIFFinfoArray, &$CommentsTargetArray) { 1808 1913 $RIFFinfoKeyLookup = array( … … 1864 1969 } 1865 1970 1971 /** 1972 * @param string $WaveFormatExData 1973 * 1974 * @return array 1975 */ 1866 1976 public static function parseWAVEFORMATex($WaveFormatExData) { 1867 1977 // shortcut 1978 $WaveFormatEx = array(); 1868 1979 $WaveFormatEx['raw'] = array(); 1869 1980 $WaveFormatEx_raw = &$WaveFormatEx['raw']; … … 1889 2000 } 1890 2001 2002 /** 2003 * @param string $WavPackChunkData 2004 * 2005 * @return bool 2006 */ 1891 2007 public function parseWavPackHeader($WavPackChunkData) { 1892 2008 // typedef struct { … … 1950 2066 } 1951 2067 2068 /** 2069 * @param string $BITMAPINFOHEADER 2070 * @param bool $littleEndian 2071 * 2072 * @return array 2073 */ 1952 2074 public static function ParseBITMAPINFOHEADER($BITMAPINFOHEADER, $littleEndian=true) { 1953 2075 … … 1969 2091 } 1970 2092 2093 /** 2094 * @param string $DIVXTAG 2095 * @param bool $raw 2096 * 2097 * @return array 2098 */ 1971 2099 public static function ParseDIVXTAG($DIVXTAG, $raw=false) { 1972 2100 // structure from "IDivX" source, Form1.frm, by "Greg Frazier of Daemonic Software Group", email: gfrazier@icestorm.net, web: http://dsg.cjb.net/ … … 2015 2143 ); 2016 2144 2145 $parsed = array(); 2017 2146 $parsed['title'] = trim(substr($DIVXTAG, 0, 32)); 2018 2147 $parsed['artist'] = trim(substr($DIVXTAG, 32, 28)); … … 2030 2159 unset($parsed['genre_id'], $parsed['rating_id']); 2031 2160 foreach ($parsed as $key => $value) { 2032 if ( !$value === '') {2033 unset($parsed[ 'key']);2161 if (empty($value)) { 2162 unset($parsed[$key]); 2034 2163 } 2035 2164 } … … 2043 2172 } 2044 2173 2174 /** 2175 * @param string $tagshortname 2176 * 2177 * @return string 2178 */ 2045 2179 public static function waveSNDMtagLookup($tagshortname) { 2046 2180 $begin = __LINE__; … … 2066 2200 } 2067 2201 2202 /** 2203 * @param int $wFormatTag 2204 * 2205 * @return string 2206 */ 2068 2207 public static function wFormatTagLookup($wFormatTag) { 2069 2208 … … 2235 2374 } 2236 2375 2376 /** 2377 * @param string $fourcc 2378 * 2379 * @return string 2380 */ 2237 2381 public static function fourccLookup($fourcc) { 2238 2382 … … 2629 2773 } 2630 2774 2775 /** 2776 * @param string $byteword 2777 * @param bool $signed 2778 * 2779 * @return int|float|false 2780 */ 2631 2781 private function EitherEndian2Int($byteword, $signed=false) { 2632 2782 if ($this->container == 'riff') {
Note: See TracChangeset
for help on using the changeset viewer.