/** * @access private */ function __construct($streamSerial, $streamData, $filePointer) { parent::__construct($streamSerial, $streamData, $filePointer); $this->_decodeHeader(); $this->_decodeCommentsHeader(); $this->_streamLength = $this->_streamInfo['total_samples'] / $this->_streamInfo['sample_rate']; }
/** * @access private */ function __construct($streamSerial, $streamData, $filePointer) { parent::__construct($streamSerial, $streamData, $filePointer); $this->_decodeHeader(); $this->_decodeCommentsHeader(); $endSec = (('0x' . substr($this->_lastGranulePos, 0, 8)) * pow(2, 32) + ('0x' . substr($this->_lastGranulePos, 8, 8))) / $this->_header['rate']; $startSec = (('0x' . substr($this->_firstGranulePos, 0, 8)) * pow(2, 32) + ('0x' . substr($this->_firstGranulePos, 8, 8))) / $this->_header['rate']; //make sure the offset is worth taking into account oggz_chop related hack if ($startSec > 1) { $this->_streamLength = $endSec - $startSec; $this->_startOffset = $startSec; } else { $this->_streamLength = $endSec; } }
/** * @access private */ function __construct($streamSerial, $streamData, $filePointer) { parent::__construct($streamSerial, $streamData, $filePointer); $this->_decodeIdentificationHeader(); $this->_decodeCommentsHeader(); $endSec = $this->getSecondsFromGranulePos($this->_lastGranulePos); $startSec = $this->getSecondsFromGranulePos($this->_firstGranulePos); //make sure the offset is worth taking into account oggz_chop related hack if ($startSec > 1) { $this->_streamLength = $endSec - $startSec; $this->_startOffset = $startSec; } else { $this->_streamLength = $endSec; } $this->_avgBitrate = $this->_streamLength ? $this->_streamSize * 8 / $this->_streamLength : 0; }