/** * Parses the buffer stream for a meta event * * @since 1.0 * @uses read() * @uses Util::unpack() * @uses getDelta() * @uses EventFactory::createMetaEvent() * * @return MetaEvent */ protected function parseMetaEvent() { $metaEventType = Util::unpack($this->read(1, true)); $metaEventType = $metaEventType[0]; $length = $this->getDelta(); $data = $this->read($length, true); return $this->eventFactory->createMetaEvent($metaEventType, $data); }
public function testCreateMetaEventWithInvalidEventType() { $this->assertInstanceOf('\\Tmont\\Midi\\Event\\UnknownMetaEvent', $this->obj->createMetaEvent(MetaEventType::DEVICE_NAME, 1)); }