本文整理汇总了PHP中getid3_riff::parseComments方法的典型用法代码示例。如果您正苦于以下问题:PHP getid3_riff::parseComments方法的具体用法?PHP getid3_riff::parseComments怎么用?PHP getid3_riff::parseComments使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类getid3_riff
的用法示例。
在下文中一共展示了getid3_riff::parseComments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Analyze
//.........这里部分代码省略.........
fseek($this->getid3->fp, $metablock['offset'] + ($metablock['large_block'] ? 4 : 2) + $metablock['size'], SEEK_SET);
break;
}
switch ($metablock['function_id']) {
case 0x21:
// ID_RIFF_HEADER
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH . 'module.audio-video.riff.php', __FILE__, true);
$original_wav_filesize = getid3_lib::LittleEndian2Int(substr($metablock['data'], 4, 4));
$getid3_temp = new getID3();
$getid3_temp->openfile($this->getid3->filename);
$getid3_riff = new getid3_riff($getid3_temp);
$getid3_riff->ParseRIFFdata($metablock['data']);
$metablock['riff'] = $getid3_temp->info['riff'];
$info['audio']['sample_rate'] = $getid3_temp->info['riff']['raw']['fmt ']['nSamplesPerSec'];
unset($getid3_riff, $getid3_temp);
$metablock['riff']['original_filesize'] = $original_wav_filesize;
$info['wavpack']['riff_trailer_size'] = $original_wav_filesize - $metablock['riff']['WAVE']['data'][0]['size'] - $metablock['riff']['header_size'];
$info['playtime_seconds'] = $info['wavpack']['blockheader']['total_samples'] / $info['audio']['sample_rate'];
// Safe RIFF header in case there's a RIFF footer later
$metablockRIFFheader = $metablock['data'];
break;
case 0x22:
// ID_RIFF_TRAILER
$metablockRIFFfooter = $metablockRIFFheader . $metablock['data'];
getid3_lib::IncludeDependency(GETID3_INCLUDEPATH . 'module.audio-video.riff.php', __FILE__, true);
$startoffset = $metablock['offset'] + ($metablock['large_block'] ? 4 : 2);
$getid3_temp = new getID3();
$getid3_temp->openfile($this->getid3->filename);
$getid3_temp->info['avdataend'] = $info['avdataend'];
$getid3_temp->info['fileformat'] = 'riff';
$getid3_riff = new getid3_riff($getid3_temp);
$metablock['riff'] = $getid3_riff->ParseRIFF($startoffset, $startoffset + $metablock['size']);
if (!empty($metablock['riff']['INFO'])) {
getid3_riff::parseComments($metablock['riff']['INFO'], $metablock['comments']);
$info['tags']['riff'] = $metablock['comments'];
}
unset($getid3_temp, $getid3_riff);
break;
case 0x23:
// ID_REPLAY_GAIN
$info['warning'][] = 'WavPack "Replay Gain" contents not yet handled by getID3() in metablock at offset ' . $metablock['offset'];
break;
case 0x24:
// ID_CUESHEET
$info['warning'][] = 'WavPack "Cuesheet" contents not yet handled by getID3() in metablock at offset ' . $metablock['offset'];
break;
case 0x25:
// ID_CONFIG_BLOCK
$metablock['flags_raw'] = getid3_lib::LittleEndian2Int(substr($metablock['data'], 0, 3));
$metablock['flags']['adobe_mode'] = (bool) ($metablock['flags_raw'] & 0x1);
// "adobe" mode for 32-bit floats
$metablock['flags']['fast_flag'] = (bool) ($metablock['flags_raw'] & 0x2);
// fast mode
$metablock['flags']['very_fast_flag'] = (bool) ($metablock['flags_raw'] & 0x4);
// double fast
$metablock['flags']['high_flag'] = (bool) ($metablock['flags_raw'] & 0x8);
// high quality mode
$metablock['flags']['very_high_flag'] = (bool) ($metablock['flags_raw'] & 0x10);
// double high (not used yet)
$metablock['flags']['bitrate_kbps'] = (bool) ($metablock['flags_raw'] & 0x20);
// bitrate is kbps, not bits / sample
$metablock['flags']['auto_shaping'] = (bool) ($metablock['flags_raw'] & 0x40);
// automatic noise shaping
$metablock['flags']['shape_override'] = (bool) ($metablock['flags_raw'] & 0x80);
// shaping mode specified
$metablock['flags']['joint_override'] = (bool) ($metablock['flags_raw'] & 0x100);