Parsed: 112443

  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;
  }