module.audio.wavpack.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. <?php
  2. /////////////////////////////////////////////////////////////////
  3. /// getID3() by James Heinrich <info@getid3.org> //
  4. // available at http://getid3.sourceforge.net //
  5. // or http://www.getid3.org //
  6. /////////////////////////////////////////////////////////////////
  7. // See readme.txt for more details //
  8. /////////////////////////////////////////////////////////////////
  9. // //
  10. // module.audio.wavpack.php //
  11. // module for analyzing WavPack v4.0+ Audio files //
  12. // dependencies: NONE //
  13. // ///
  14. /////////////////////////////////////////////////////////////////
  15. class getid3_wavpack
  16. {
  17. function getid3_wavpack(&$fd, &$ThisFileInfo) {
  18. fseek($fd, $ThisFileInfo['avdataoffset'], SEEK_SET);
  19. while (true) {
  20. $wavpackheader = fread($fd, 32);
  21. if (ftell($fd) >= $ThisFileInfo['avdataend']) {
  22. break;
  23. } elseif (feof($fd)) {
  24. break;
  25. } elseif (
  26. (@$ThisFileInfo['wavpack']['blockheader']['total_samples'] > 0) &&
  27. (@$ThisFileInfo['wavpack']['blockheader']['block_samples'] > 0) &&
  28. (!isset($ThisFileInfo['wavpack']['riff_trailer_size']) || ($ThisFileInfo['wavpack']['riff_trailer_size'] <= 0)) &&
  29. ((@$ThisFileInfo['wavpack']['config_flags']['md5_checksum'] === false) || !empty($ThisFileInfo['md5_data_source']))) {
  30. break;
  31. }
  32. $blockheader_offset = ftell($fd) - 32;
  33. $blockheader_magic = substr($wavpackheader, 0, 4);
  34. $blockheader_size = getid3_lib::LittleEndian2Int(substr($wavpackheader, 4, 4));
  35. if ($blockheader_magic != 'wvpk') {
  36. $ThisFileInfo['error'][] = 'Expecting "wvpk" at offset '.$blockheader_offset.', found "'.$blockheader_magic.'"';
  37. if ((@$ThisFileInfo['audio']['dataformat'] != 'wavpack') && (@$ThisFileInfo['audio']['dataformat'] != 'wvc')) {
  38. unset($ThisFileInfo['fileformat']);
  39. unset($ThisFileInfo['audio']);
  40. unset($ThisFileInfo['wavpack']);
  41. }
  42. return false;
  43. }
  44. if ((@$ThisFileInfo['wavpack']['blockheader']['block_samples'] <= 0) ||
  45. (@$ThisFileInfo['wavpack']['blockheader']['total_samples'] <= 0)) {
  46. // Also, it is possible that the first block might not have
  47. // any samples (block_samples == 0) and in this case you should skip blocks
  48. // until you find one with samples because the other information (like
  49. // total_samples) are not guaranteed to be correct until (block_samples > 0)
  50. // Finally, I have defined a format for files in which the length is not known
  51. // (for example when raw files are created using pipes). In these cases
  52. // total_samples will be -1 and you must seek to the final block to determine
  53. // the total number of samples.
  54. $ThisFileInfo['audio']['dataformat'] = 'wavpack';
  55. $ThisFileInfo['fileformat'] = 'wavpack';
  56. $ThisFileInfo['audio']['lossless'] = true;
  57. $ThisFileInfo['audio']['bitrate_mode'] = 'vbr';
  58. $ThisFileInfo['wavpack']['blockheader']['offset'] = $blockheader_offset;
  59. $ThisFileInfo['wavpack']['blockheader']['magic'] = $blockheader_magic;
  60. $ThisFileInfo['wavpack']['blockheader']['size'] = $blockheader_size;
  61. if ($ThisFileInfo['wavpack']['blockheader']['size'] >= 0x100000) {
  62. $ThisFileInfo['error'][] = 'Expecting WavPack block size less than "0x100000", found "'.$ThisFileInfo['wavpack']['blockheader']['size'].'" at offset '.$ThisFileInfo['wavpack']['blockheader']['offset'];
  63. if ((@$ThisFileInfo['audio']['dataformat'] != 'wavpack') && (@$ThisFileInfo['audio']['dataformat'] != 'wvc')) {
  64. unset($ThisFileInfo['fileformat']);
  65. unset($ThisFileInfo['audio']);
  66. unset($ThisFileInfo['wavpack']);
  67. }
  68. return false;
  69. }
  70. $ThisFileInfo['wavpack']['blockheader']['minor_version'] = ord($wavpackheader{8});
  71. $ThisFileInfo['wavpack']['blockheader']['major_version'] = ord($wavpackheader{9});
  72. if (($ThisFileInfo['wavpack']['blockheader']['major_version'] != 4) ||
  73. (($ThisFileInfo['wavpack']['blockheader']['minor_version'] < 4) &&
  74. ($ThisFileInfo['wavpack']['blockheader']['minor_version'] > 16))) {
  75. $ThisFileInfo['error'][] = 'Expecting WavPack version between "4.2" and "4.16", found version "'.$ThisFileInfo['wavpack']['blockheader']['major_version'].'.'.$ThisFileInfo['wavpack']['blockheader']['minor_version'].'" at offset '.$ThisFileInfo['wavpack']['blockheader']['offset'];
  76. if ((@$ThisFileInfo['audio']['dataformat'] != 'wavpack') && (@$ThisFileInfo['audio']['dataformat'] != 'wvc')) {
  77. unset($ThisFileInfo['fileformat']);
  78. unset($ThisFileInfo['audio']);
  79. unset($ThisFileInfo['wavpack']);
  80. }
  81. return false;
  82. }
  83. $ThisFileInfo['wavpack']['blockheader']['track_number'] = ord($wavpackheader{10}); // unused
  84. $ThisFileInfo['wavpack']['blockheader']['index_number'] = ord($wavpackheader{11}); // unused
  85. $ThisFileInfo['wavpack']['blockheader']['total_samples'] = getid3_lib::LittleEndian2Int(substr($wavpackheader, 12, 4));
  86. $ThisFileInfo['wavpack']['blockheader']['block_index'] = getid3_lib::LittleEndian2Int(substr($wavpackheader, 16, 4));
  87. $ThisFileInfo['wavpack']['blockheader']['block_samples'] = getid3_lib::LittleEndian2Int(substr($wavpackheader, 20, 4));
  88. $ThisFileInfo['wavpack']['blockheader']['flags_raw'] = getid3_lib::LittleEndian2Int(substr($wavpackheader, 24, 4));
  89. $ThisFileInfo['wavpack']['blockheader']['crc'] = getid3_lib::LittleEndian2Int(substr($wavpackheader, 28, 4));
  90. $ThisFileInfo['wavpack']['blockheader']['flags']['bytes_per_sample'] = 1 + ($ThisFileInfo['wavpack']['blockheader']['flags_raw'] & 0x00000003);
  91. $ThisFileInfo['wavpack']['blockheader']['flags']['mono'] = (bool) ($ThisFileInfo['wavpack']['blockheader']['flags_raw'] & 0x00000004);
  92. $ThisFileInfo['wavpack']['blockheader']['flags']['hybrid'] = (bool) ($ThisFileInfo['wavpack']['blockheader']['flags_raw'] & 0x00000008);
  93. $ThisFileInfo['wavpack']['blockheader']['flags']['joint_stereo'] = (bool) ($ThisFileInfo['wavpack']['blockheader']['flags_raw'] & 0x00000010);
  94. $ThisFileInfo['wavpack']['blockheader']['flags']['cross_decorrelation'] = (bool) ($ThisFileInfo['wavpack']['blockheader']['flags_raw'] & 0x00000020);
  95. $ThisFileInfo['wavpack']['blockheader']['flags']['hybrid_noiseshape'] = (bool) ($ThisFileInfo['wavpack']['blockheader']['flags_raw'] & 0x00000040);
  96. $ThisFileInfo['wavpack']['blockheader']['flags']['ieee_32bit_float'] = (bool) ($ThisFileInfo['wavpack']['blockheader']['flags_raw'] & 0x00000080);
  97. $ThisFileInfo['wavpack']['blockheader']['flags']['int_32bit'] = (bool) ($ThisFileInfo['wavpack']['blockheader']['flags_raw'] & 0x00000100);
  98. $ThisFileInfo['wavpack']['blockheader']['flags']['hybrid_bitrate_noise'] = (bool) ($ThisFileInfo['wavpack']['blockheader']['flags_raw'] & 0x00000200);
  99. $ThisFileInfo['wavpack']['blockheader']['flags']['hybrid_balance_noise'] = (bool) ($ThisFileInfo['wavpack']['blockheader']['flags_raw'] & 0x00000400);
  100. $ThisFileInfo['wavpack']['blockheader']['flags']['multichannel_initial'] = (bool) ($ThisFileInfo['wavpack']['blockheader']['flags_raw'] & 0x00000800);
  101. $ThisFileInfo['wavpack']['blockheader']['flags']['multichannel_final'] = (bool) ($ThisFileInfo['wavpack']['blockheader']['flags_raw'] & 0x00001000);
  102. $ThisFileInfo['audio']['lossless'] = !$ThisFileInfo['wavpack']['blockheader']['flags']['hybrid'];
  103. }
  104. while (!feof($fd) && (ftell($fd) < ($blockheader_offset + $blockheader_size + 8))) {
  105. $metablock = array('offset'=>ftell($fd));
  106. $metablockheader = fread($fd, 2);
  107. if (feof($fd)) {
  108. break;
  109. }
  110. $metablock['id'] = ord($metablockheader{0});
  111. $metablock['function_id'] = ($metablock['id'] & 0x3F);
  112. $metablock['function_name'] = $this->WavPackMetablockNameLookup($metablock['function_id']);
  113. // The 0x20 bit in the id of the meta subblocks (which is defined as
  114. // ID_OPTIONAL_DATA) is a permanent part of the id. The idea is that
  115. // if a decoder encounters an id that it does not know about, it uses
  116. // that "ID_OPTIONAL_DATA" flag to determine what to do. If it is set
  117. // then the decoder simply ignores the metadata, but if it is zero
  118. // then the decoder should quit because it means that an understanding
  119. // of the metadata is required to correctly decode the audio.
  120. $metablock['non_decoder'] = (bool) ($metablock['id'] & 0x20);
  121. $metablock['padded_data'] = (bool) ($metablock['id'] & 0x40);
  122. $metablock['large_block'] = (bool) ($metablock['id'] & 0x80);
  123. if ($metablock['large_block']) {
  124. $metablockheader .= fread($fd, 2);
  125. }
  126. $metablock['size'] = getid3_lib::LittleEndian2Int(substr($metablockheader, 1)) * 2; // size is stored in words
  127. $metablock['data'] = null;
  128. if ($metablock['size'] > 0) {
  129. switch ($metablock['function_id']) {
  130. case 0x21: // ID_RIFF_HEADER
  131. case 0x22: // ID_RIFF_TRAILER
  132. case 0x23: // ID_REPLAY_GAIN
  133. case 0x24: // ID_CUESHEET
  134. case 0x25: // ID_CONFIG_BLOCK
  135. case 0x26: // ID_MD5_CHECKSUM
  136. $metablock['data'] = fread($fd, $metablock['size']);
  137. if ($metablock['padded_data']) {
  138. // padded to the nearest even byte
  139. $metablock['size']--;
  140. $metablock['data'] = substr($metablock['data'], 0, -1);
  141. }
  142. break;
  143. case 0x00: // ID_DUMMY
  144. case 0x01: // ID_ENCODER_INFO
  145. case 0x02: // ID_DECORR_TERMS
  146. case 0x03: // ID_DECORR_WEIGHTS
  147. case 0x04: // ID_DECORR_SAMPLES
  148. case 0x05: // ID_ENTROPY_VARS
  149. case 0x06: // ID_HYBRID_PROFILE
  150. case 0x07: // ID_SHAPING_WEIGHTS
  151. case 0x08: // ID_FLOAT_INFO
  152. case 0x09: // ID_INT32_INFO
  153. case 0x0A: // ID_WV_BITSTREAM
  154. case 0x0B: // ID_WVC_BITSTREAM
  155. case 0x0C: // ID_WVX_BITSTREAM
  156. case 0x0D: // ID_CHANNEL_INFO
  157. fseek($fd, $metablock['offset'] + ($metablock['large_block'] ? 4 : 2) + $metablock['size'], SEEK_SET);
  158. break;
  159. default:
  160. $ThisFileInfo['warning'][] = 'Unexpected metablock type "0x'.str_pad(dechex($metablock['function_id']), 2, '0', STR_PAD_LEFT).'" at offset '.$metablock['offset'];
  161. fseek($fd, $metablock['offset'] + ($metablock['large_block'] ? 4 : 2) + $metablock['size'], SEEK_SET);
  162. break;
  163. }
  164. switch ($metablock['function_id']) {
  165. case 0x21: // ID_RIFF_HEADER
  166. getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true);
  167. $original_wav_filesize = getid3_lib::LittleEndian2Int(substr($metablock['data'], 4, 4));
  168. getid3_riff::ParseRIFFdata($metablock['data'], $ParsedRIFFheader);
  169. $metablock['riff'] = $ParsedRIFFheader['riff'];
  170. $metablock['riff']['original_filesize'] = $original_wav_filesize;
  171. $ThisFileInfo['wavpack']['riff_trailer_size'] = $original_wav_filesize - $metablock['riff']['WAVE']['data'][0]['size'] - $metablock['riff']['header_size'];
  172. $ThisFileInfo['audio']['sample_rate'] = $ParsedRIFFheader['riff']['raw']['fmt ']['nSamplesPerSec'];
  173. $ThisFileInfo['playtime_seconds'] = $ThisFileInfo['wavpack']['blockheader']['total_samples'] / $ThisFileInfo['audio']['sample_rate'];
  174. // Safe RIFF header in case there's a RIFF footer later
  175. $metablockRIFFheader = $metablock['data'];
  176. break;
  177. case 0x22: // ID_RIFF_TRAILER
  178. $metablockRIFFfooter = $metablockRIFFheader.$metablock['data'];
  179. getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true);
  180. $ftell_old = ftell($fd);
  181. $startoffset = $metablock['offset'] + ($metablock['large_block'] ? 4 : 2);
  182. $ParsedRIFFfooter = array('avdataend'=>$ThisFileInfo['avdataend'], 'fileformat'=>'riff', 'error'=>array(), 'warning'=>array());
  183. $metablock['riff'] = getid3_riff::ParseRIFF($fd, $startoffset, $startoffset + $metablock['size'], $ParsedRIFFfooter);
  184. fseek($fd, $ftell_old, SEEK_SET);
  185. if (!empty($metablock['riff']['INFO'])) {
  186. getid3_riff::RIFFcommentsParse($metablock['riff']['INFO'], $metablock['comments']);
  187. $ThisFileInfo['tags']['riff'] = $metablock['comments'];
  188. }
  189. break;
  190. case 0x23: // ID_REPLAY_GAIN
  191. $ThisFileInfo['warning'][] = 'WavPack "Replay Gain" contents not yet handled by getID3() in metablock at offset '.$metablock['offset'];
  192. break;
  193. case 0x24: // ID_CUESHEET
  194. $ThisFileInfo['warning'][] = 'WavPack "Cuesheet" contents not yet handled by getID3() in metablock at offset '.$metablock['offset'];
  195. break;
  196. case 0x25: // ID_CONFIG_BLOCK
  197. $metablock['flags_raw'] = getid3_lib::LittleEndian2Int(substr($metablock['data'], 0, 3));
  198. $metablock['flags']['adobe_mode'] = (bool) ($metablock['flags_raw'] & 0x000001); // "adobe" mode for 32-bit floats
  199. $metablock['flags']['fast_flag'] = (bool) ($metablock['flags_raw'] & 0x000002); // fast mode
  200. $metablock['flags']['very_fast_flag'] = (bool) ($metablock['flags_raw'] & 0x000004); // double fast
  201. $metablock['flags']['high_flag'] = (bool) ($metablock['flags_raw'] & 0x000008); // high quality mode
  202. $metablock['flags']['very_high_flag'] = (bool) ($metablock['flags_raw'] & 0x000010); // double high (not used yet)
  203. $metablock['flags']['bitrate_kbps'] = (bool) ($metablock['flags_raw'] & 0x000020); // bitrate is kbps, not bits / sample
  204. $metablock['flags']['auto_shaping'] = (bool) ($metablock['flags_raw'] & 0x000040); // automatic noise shaping
  205. $metablock['flags']['shape_override'] = (bool) ($metablock['flags_raw'] & 0x000080); // shaping mode specified
  206. $metablock['flags']['joint_override'] = (bool) ($metablock['flags_raw'] & 0x000100); // joint-stereo mode specified
  207. $metablock['flags']['copy_time'] = (bool) ($metablock['flags_raw'] & 0x000200); // copy file-time from source
  208. $metablock['flags']['create_exe'] = (bool) ($metablock['flags_raw'] & 0x000400); // create executable
  209. $metablock['flags']['create_wvc'] = (bool) ($metablock['flags_raw'] & 0x000800); // create correction file
  210. $metablock['flags']['optimize_wvc'] = (bool) ($metablock['flags_raw'] & 0x001000); // maximize bybrid compression
  211. $metablock['flags']['quality_mode'] = (bool) ($metablock['flags_raw'] & 0x002000); // psychoacoustic quality mode
  212. $metablock['flags']['raw_flag'] = (bool) ($metablock['flags_raw'] & 0x004000); // raw mode (not implemented yet)
  213. $metablock['flags']['calc_noise'] = (bool) ($metablock['flags_raw'] & 0x008000); // calc noise in hybrid mode
  214. $metablock['flags']['lossy_mode'] = (bool) ($metablock['flags_raw'] & 0x010000); // obsolete (for information)
  215. $metablock['flags']['extra_mode'] = (bool) ($metablock['flags_raw'] & 0x020000); // extra processing mode
  216. $metablock['flags']['skip_wvx'] = (bool) ($metablock['flags_raw'] & 0x040000); // no wvx stream w/ floats & big ints
  217. $metablock['flags']['md5_checksum'] = (bool) ($metablock['flags_raw'] & 0x080000); // compute & store MD5 signature
  218. $metablock['flags']['quiet_mode'] = (bool) ($metablock['flags_raw'] & 0x100000); // don't report progress %
  219. $ThisFileInfo['wavpack']['config_flags'] = $metablock['flags'];
  220. if ($ThisFileInfo['wavpack']['blockheader']['flags']['hybrid']) {
  221. @$ThisFileInfo['audio']['encoder_options'] .= ' -b???';
  222. }
  223. @$ThisFileInfo['audio']['encoder_options'] .= ($metablock['flags']['adobe_mode'] ? ' -a' : '');
  224. @$ThisFileInfo['audio']['encoder_options'] .= ($metablock['flags']['optimize_wvc'] ? ' -cc' : '');
  225. @$ThisFileInfo['audio']['encoder_options'] .= ($metablock['flags']['create_exe'] ? ' -e' : '');
  226. @$ThisFileInfo['audio']['encoder_options'] .= ($metablock['flags']['fast_flag'] ? ' -f' : '');
  227. @$ThisFileInfo['audio']['encoder_options'] .= ($metablock['flags']['joint_override'] ? ' -j?' : '');
  228. @$ThisFileInfo['audio']['encoder_options'] .= ($metablock['flags']['high_flag'] ? ' -h' : '');
  229. @$ThisFileInfo['audio']['encoder_options'] .= ($metablock['flags']['md5_checksum'] ? ' -m' : '');
  230. @$ThisFileInfo['audio']['encoder_options'] .= ($metablock['flags']['calc_noise'] ? ' -n' : '');
  231. @$ThisFileInfo['audio']['encoder_options'] .= ($metablock['flags']['shape_override'] ? ' -s?' : '');
  232. @$ThisFileInfo['audio']['encoder_options'] .= ($metablock['flags']['extra_mode'] ? ' -x?' : '');
  233. if (@$ThisFileInfo['audio']['encoder_options']) {
  234. $ThisFileInfo['audio']['encoder_options'] = trim(@$ThisFileInfo['audio']['encoder_options']);
  235. }
  236. elseif (isset($ThisFileInfo['audio']['encoder_options'])) {
  237. unset($ThisFileInfo['audio']['encoder_options']);
  238. }
  239. break;
  240. case 0x26: // ID_MD5_CHECKSUM
  241. if (strlen($metablock['data']) == 16) {
  242. $ThisFileInfo['md5_data_source'] = strtolower(getid3_lib::PrintHexBytes($metablock['data'], true, false, false));
  243. } else {
  244. $ThisFileInfo['warning'][] = 'Expecting 16 bytes of WavPack "MD5 Checksum" in metablock at offset '.$metablock['offset'].', but found '.strlen($metablock['data']).' bytes';
  245. }
  246. break;
  247. case 0x00: // ID_DUMMY
  248. case 0x01: // ID_ENCODER_INFO
  249. case 0x02: // ID_DECORR_TERMS
  250. case 0x03: // ID_DECORR_WEIGHTS
  251. case 0x04: // ID_DECORR_SAMPLES
  252. case 0x05: // ID_ENTROPY_VARS
  253. case 0x06: // ID_HYBRID_PROFILE
  254. case 0x07: // ID_SHAPING_WEIGHTS
  255. case 0x08: // ID_FLOAT_INFO
  256. case 0x09: // ID_INT32_INFO
  257. case 0x0A: // ID_WV_BITSTREAM
  258. case 0x0B: // ID_WVC_BITSTREAM
  259. case 0x0C: // ID_WVX_BITSTREAM
  260. case 0x0D: // ID_CHANNEL_INFO
  261. unset($metablock);
  262. break;
  263. }
  264. }
  265. if (!empty($metablock)) {
  266. $ThisFileInfo['wavpack']['metablocks'][] = $metablock;
  267. }
  268. }
  269. }
  270. $ThisFileInfo['audio']['encoder'] = 'WavPack v'.$ThisFileInfo['wavpack']['blockheader']['major_version'].'.'.str_pad($ThisFileInfo['wavpack']['blockheader']['minor_version'], 2, '0', STR_PAD_LEFT);
  271. $ThisFileInfo['audio']['bits_per_sample'] = $ThisFileInfo['wavpack']['blockheader']['flags']['bytes_per_sample'] * 8;
  272. $ThisFileInfo['audio']['channels'] = ($ThisFileInfo['wavpack']['blockheader']['flags']['mono'] ? 1 : 2);
  273. if (@$ThisFileInfo['playtime_seconds']) {
  274. $ThisFileInfo['audio']['bitrate'] = (($ThisFileInfo['avdataend'] - $ThisFileInfo['avdataoffset']) * 8) / $ThisFileInfo['playtime_seconds'];
  275. } else {
  276. $ThisFileInfo['audio']['dataformat'] = 'wvc';
  277. }
  278. return true;
  279. }
  280. function WavPackMetablockNameLookup(&$id) {
  281. static $WavPackMetablockNameLookup = array(
  282. 0x00 => 'Dummy',
  283. 0x01 => 'Encoder Info',
  284. 0x02 => 'Decorrelation Terms',
  285. 0x03 => 'Decorrelation Weights',
  286. 0x04 => 'Decorrelation Samples',
  287. 0x05 => 'Entropy Variables',
  288. 0x06 => 'Hybrid Profile',
  289. 0x07 => 'Shaping Weights',
  290. 0x08 => 'Float Info',
  291. 0x09 => 'Int32 Info',
  292. 0x0A => 'WV Bitstream',
  293. 0x0B => 'WVC Bitstream',
  294. 0x0C => 'WVX Bitstream',
  295. 0x0D => 'Channel Info',
  296. 0x21 => 'RIFF header',
  297. 0x22 => 'RIFF trailer',
  298. 0x23 => 'Replay Gain',
  299. 0x24 => 'Cuesheet',
  300. 0x25 => 'Config Block',
  301. 0x26 => 'MD5 Checksum',
  302. );
  303. return (@$WavPackMetablockNameLookup[$id]);
  304. }
  305. }
  306. ?>