public function getSampleBlock($blockNum)
    {
        // check preconditions
        if (!$this->_dataSize_valid) {
            $this->setDataSize();  // implicit setSize(), setActualSize(), setNumBlocks()
        }

        $offset = $blockNum * $this->_blockAlign;
        if ($offset + $this->_blockAlign > $this->_dataSize || $offset < 0) {
            return null;
        }


        // read data
        return substr($this->_samples, $offset, $this->_blockAlign);
    }
public function getSampleBlock($blockNum)
    {
        // check preconditions
        if (!$this->_dataSize_valid) {
            $this->setDataSize();  // implicit setSize(), setActualSize(), setNumBlocks()
        }

        $offset = $blockNum * $this->_blockAlign;
        if ($offset + $this->_blockAlign > $this->_dataSize || $offset < 0) {
            return null;
        }


        // read data
        return substr($this->_samples, $offset, $this->_blockAlign);
    }
public function getSampleBlock ( $ blockNum ) { // check preconditions if ( ! $ this -> _dataSize_valid ) { $ this -> setDataSize ( ) ; // implicit setSize(), setActualSize(), setNumBlocks() } $ offset = $ blockNum * $ this -> _blockAlign ; if ( $ offset + $ this -> _blockAlign > $ this -> _dataSize || $ offset < 0 ) { return null ; } // read data return substr ( $ this -> _samples , $ offset , $ this -> _blockAlign ) ; }
Return a single sample block from the file.

@param int $blockNum  (Required) The sample block number. Zero based.
@return string|null  The binary sample block (all channels). Returns null if the sample block number was out of range.
Return a single sample block from the file .