getid3_apetag::parseAPEheaderFooter() –

You appear to be a bot. Output may be restricted

Description

Usage

$array|false = getid3_apetag::parseAPEheaderFooter( $APEheaderFooterData );

Parameters

$APEheaderFooterData
( string ) required

Returns

array|false

Source

File name: wordpress/wp-includes/ID3/module.tag.apetag.php


Lines:

1 to 25 of 25
  public function parseAPEheaderFooter($APEheaderFooterData) {
    // http://www.uni-jena.de/~pfk/mpp/sv8/apeheader.html

    // shortcut
    $headerfooterinfo = array();
    $headerfooterinfo['raw'] = array();
    $headerfooterinfo_raw = &$headerfooterinfo['raw'];

    $headerfooterinfo_raw['footer_tag']   =                  substr($APEheaderFooterData,  0, 8);
    if ($headerfooterinfo_raw['footer_tag'] != 'APETAGEX') {
      return false;
    }
    $headerfooterinfo_raw['version']      = getid3_lib::LittleEndian2Int(substr($APEheaderFooterData,  8, 4));
    $headerfooterinfo_raw['tagsize']      = getid3_lib::LittleEndian2Int(substr($APEheaderFooterData, 12, 4));
    $headerfooterinfo_raw['tag_items']    = getid3_lib::LittleEndian2Int(substr($APEheaderFooterData, 16, 4));
    $headerfooterinfo_raw['global_flags'] = getid3_lib::LittleEndian2Int(substr($APEheaderFooterData, 20, 4));
    $headerfooterinfo_raw['reserved']     =                              substr($APEheaderFooterData, 24, 8);

    $headerfooterinfo['tag_version']         = $headerfooterinfo_raw['version'] / 1000;
    if ($headerfooterinfo['tag_version'] >= 2) {
      $headerfooterinfo['flags'] = $this->getid3_apetag::parseAPEtagFlags($headerfooterinfo_raw['global_flags']);
    }
    return $headerfooterinfo;
  }
 

 View on GitHub View on Trac