/** * @param DataSection $section * * @return Header */ public static function createFromDataSection(DataSection $section) { $header = new Header(); $header->id = self::RIFF; $header->size = 40 + $section->getSize(); $header->format = self::WAVE; return $header; }
/** * @param resource $handle */ protected function writeDataSection($handle) { Helper::writeString($handle, $this->dataSection->getId()); Helper::writeLong($handle, $this->dataSection->getSize()); Helper::writeString($handle, $this->dataSection->getRaw()); }