getid3_flac::parseSTREAMINFOdata() –

You appear to be a bot. Output may be restricted

Description

Usage

$array = getid3_flac::parseSTREAMINFOdata( $BlockData );

Parameters

$BlockData
( string ) required

Returns

array

Source

File name: wordpress/wp-includes/ID3/module.audio.flac.php
Lines:

1 to 17 of 17
  public static function parseSTREAMINFOdata($BlockData) {
    $streaminfo = array();
    $streaminfo['min_block_size']  = getid3_lib::BigEndian2Int(substr($BlockData, 0, 2));
    $streaminfo['max_block_size']  = getid3_lib::BigEndian2Int(substr($BlockData, 2, 2));
    $streaminfo['min_frame_size']  = getid3_lib::BigEndian2Int(substr($BlockData, 4, 3));
    $streaminfo['max_frame_size']  = getid3_lib::BigEndian2Int(substr($BlockData, 7, 3));

    $SRCSBSS                       = getid3_lib::BigEndian2Bin(substr($BlockData, 10, 8));
    $streaminfo['sample_rate']     = getid3_lib::Bin2Dec(substr($SRCSBSS,  0, 20));
    $streaminfo['channels']        = getid3_lib::Bin2Dec(substr($SRCSBSS, 20,  3)) + 1;
    $streaminfo['bits_per_sample'] = getid3_lib::Bin2Dec(substr($SRCSBSS, 23,  5)) + 1;
    $streaminfo['samples_stream']  = getid3_lib::Bin2Dec(substr($SRCSBSS, 28, 36));

    $streaminfo['audio_signature'] =                           substr($BlockData, 18, 16);

    return $streaminfo;
  }
 

 View on GitHub View on Trac