当前位置: 首页>>代码示例>>PHP>>正文


PHP getid3_riff::RIFFwFormatTagLookup方法代码示例

本文整理汇总了PHP中getid3_riff::RIFFwFormatTagLookup方法的典型用法代码示例。如果您正苦于以下问题:PHP getid3_riff::RIFFwFormatTagLookup方法的具体用法?PHP getid3_riff::RIFFwFormatTagLookup怎么用?PHP getid3_riff::RIFFwFormatTagLookup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在getid3_riff的用法示例。


在下文中一共展示了getid3_riff::RIFFwFormatTagLookup方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: RIFFparseWAVEFORMATex

 function RIFFparseWAVEFORMATex($WaveFormatExData)
 {
     // shortcut
     $WaveFormatEx['raw'] = array();
     $WaveFormatEx_raw =& $WaveFormatEx['raw'];
     $WaveFormatEx_raw['wFormatTag'] = getid3_lib::LittleEndian2Int(substr($WaveFormatExData, 0, 2));
     $WaveFormatEx_raw['nChannels'] = getid3_lib::LittleEndian2Int(substr($WaveFormatExData, 2, 2));
     $WaveFormatEx_raw['nSamplesPerSec'] = getid3_lib::LittleEndian2Int(substr($WaveFormatExData, 4, 4));
     $WaveFormatEx_raw['nAvgBytesPerSec'] = getid3_lib::LittleEndian2Int(substr($WaveFormatExData, 8, 4));
     $WaveFormatEx_raw['nBlockAlign'] = getid3_lib::LittleEndian2Int(substr($WaveFormatExData, 12, 2));
     $WaveFormatEx_raw['wBitsPerSample'] = getid3_lib::LittleEndian2Int(substr($WaveFormatExData, 14, 2));
     if (strlen($WaveFormatExData) > 16) {
         $WaveFormatEx_raw['cbSize'] = getid3_lib::LittleEndian2Int(substr($WaveFormatExData, 16, 2));
     }
     $WaveFormatEx['codec'] = getid3_riff::RIFFwFormatTagLookup($WaveFormatEx_raw['wFormatTag']);
     $WaveFormatEx['channels'] = $WaveFormatEx_raw['nChannels'];
     $WaveFormatEx['sample_rate'] = $WaveFormatEx_raw['nSamplesPerSec'];
     $WaveFormatEx['bitrate'] = $WaveFormatEx_raw['nAvgBytesPerSec'] * 8;
     $WaveFormatEx['bits_per_sample'] = $WaveFormatEx_raw['wBitsPerSample'];
     return $WaveFormatEx;
 }
开发者ID:ioanok,项目名称:symfoxid,代码行数:21,代码来源:module.audio-video.riff.php

示例2: RIFFparseWAVEFORMATex

 public static function RIFFparseWAVEFORMATex($wave_format_ex_data)
 {
     $wave_format_ex['raw'] = array();
     $wave_format_ex_raw =& $wave_format_ex['raw'];
     getid3_lib::ReadSequence('LittleEndian2Int', $wave_format_ex_raw, $wave_format_ex_data, 0, array('wFormatTag' => 2, 'nChannels' => 2, 'nSamplesPerSec' => 4, 'nAvgBytesPerSec' => 4, 'nBlockAlign' => 2, 'wBitsPerSample' => 2));
     if (strlen($wave_format_ex_data) > 16) {
         $wave_format_ex_raw['cbSize'] = getid3_lib::LittleEndian2Int(substr($wave_format_ex_data, 16, 2));
     }
     $wave_format_ex['codec'] = getid3_riff::RIFFwFormatTagLookup($wave_format_ex_raw['wFormatTag']);
     $wave_format_ex['channels'] = $wave_format_ex_raw['nChannels'];
     $wave_format_ex['sample_rate'] = $wave_format_ex_raw['nSamplesPerSec'];
     $wave_format_ex['bitrate'] = $wave_format_ex_raw['nAvgBytesPerSec'] * 8;
     if (@$wave_format_ex_raw['wBitsPerSample']) {
         $wave_format_ex['bits_per_sample'] = $wave_format_ex_raw['wBitsPerSample'];
     }
     return $wave_format_ex;
 }
开发者ID:jwlynch,项目名称:openacs.core,代码行数:17,代码来源:module.audio-video.riff.php


注:本文中的getid3_riff::RIFFwFormatTagLookup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。