WordPress at a glance
function is not described

getid3_flac::parseSTREAMINFO() private WP 1.0

{} It's a method of the class: getid3_flac{}

No Hooks.

Return

true|false. Nothing.

Usage

// private - for code of main (parent) class only
$result = $this->parseSTREAMINFO( $BlockData );
$BlockData(string) (required)
-

Code of getid3_flac::parseSTREAMINFO() WP 5.7.2

<?php
private function parseSTREAMINFO($BlockData) {
	$info = &$this->getid3->info;

	$info['flac']['STREAMINFO'] = self::parseSTREAMINFOdata($BlockData);

	if (!empty($info['flac']['STREAMINFO']['sample_rate'])) {

		$info['audio']['bitrate_mode']    = 'vbr';
		$info['audio']['sample_rate']     = $info['flac']['STREAMINFO']['sample_rate'];
		$info['audio']['channels']        = $info['flac']['STREAMINFO']['channels'];
		$info['audio']['bits_per_sample'] = $info['flac']['STREAMINFO']['bits_per_sample'];
		$info['playtime_seconds']         = $info['flac']['STREAMINFO']['samples_stream'] / $info['flac']['STREAMINFO']['sample_rate'];
		if ($info['playtime_seconds'] > 0) {
			if (!$this->isDependencyFor('matroska')) {
				$info['audio']['bitrate'] = (($info['avdataend'] - $info['avdataoffset']) * 8) / $info['playtime_seconds'];
			}
			else {
				$this->warning('Cannot determine audio bitrate because total stream size is unknown');
			}
		}

	} else {
		return $this->error('Corrupt METAdata block: STREAMINFO');
	}

	return true;
}