Exemplo n.º 1
0
 /**
  * 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);
 }
Exemplo n.º 2
0
 public function testCreateMetaEventWithInvalidEventType()
 {
     $this->assertInstanceOf('\\Tmont\\Midi\\Event\\UnknownMetaEvent', $this->obj->createMetaEvent(MetaEventType::DEVICE_NAME, 1));
 }