Added set priority to AddMetadataFilter class

This commit is contained in:
shadrech 2017-01-09 17:34:43 +00:00
commit 35474279e1

View file

@ -9,16 +9,19 @@ class AddMetadataFilter implements AudioFilterInterface
{ {
/** @var Array */ /** @var Array */
private $metaArr; private $metaArr;
/** @var Integer */
private $priority;
function __construct($data = null) function __construct($data = null, $priority = 9)
{ {
$this->metaArr = $data; $this->metaArr = $data;
$this->priority = $priority;
} }
public function getPriority() public function getPriority()
{ {
//must be of high priority in case theres a second input stream (artwork) to register with audio //must be of high priority in case theres a second input stream (artwork) to register with audio
return 9; return $this->priority;
} }
public function apply(Audio $audio, AudioInterface $format) public function apply(Audio $audio, AudioInterface $format)