readHeaderBSI example

unset($info['fileformat']$info['ac3']);
                return $this->error('Expecting "'.dechex(self::syncword).'" at offset '.$info['avdataoffset'].', found "'.dechex($this->AC3header['syncinfo']).'"');
            }
        }

        $info['audio']['dataformat']   = 'ac3';
        $info['audio']['bitrate_mode'] = 'cbr';
        $info['audio']['lossless']     = false;

        if ($thisfile_ac3_raw_bsi['bsid'] <= 8) {

            $thisfile_ac3_raw_bsi['crc1']       = getid3_lib::Bin2Dec($this->readHeaderBSI(16));
            $thisfile_ac3_raw_bsi['fscod']      =                     $this->readHeaderBSI(2);   // 5.4.1.3             $thisfile_ac3_raw_bsi['frmsizecod'] =                     $this->readHeaderBSI(6);   // 5.4.1.4             if ($thisfile_ac3_raw_bsi['frmsizecod'] > 37) { // binary: 100101 - see Table 5.18 Frame Size Code Table (1 word = 16 bits)                 $this->warning('Unexpected ac3.bsi.frmsizecod value: '.$thisfile_ac3_raw_bsi['frmsizecod'].', bitrate not set correctly');
            }

            $thisfile_ac3_raw_bsi['bsid']  = $this->readHeaderBSI(5); // we already know this from pre-parsing the version identifier, but re-read it to let the bitstream flow as intended             $thisfile_ac3_raw_bsi['bsmod'] = $this->readHeaderBSI(3);
            $thisfile_ac3_raw_bsi['acmod'] = $this->readHeaderBSI(3);

            if ($thisfile_ac3_raw_bsi['acmod'] & 0x01) {
                
Home | Imprint | This part of the site doesn't use cookies.