php-pulseaudio/src/Sink/Sink.php

78 lines
1.3 KiB
PHP

<?php
namespace NoccyLabs\PulseAudio\Sink;
use NoccyLabs\PulseAudio\PulseAudio;
use NoccyLabs\PulseAudio\PropertyList;
class Sink
{
protected $index;
protected $name;
protected $card;
protected $driver;
protected $properties;
protected $pulse;
protected $monitor;
public function __construct(PulseAudio $pulse, $index, array $sink)
{
$this->pulse = $pulse;
$this->index = $index;
$this->name = $sink['name'];
//$this->card = $sink['card'];
$this->driver = $sink['driver'];
$this->monitor = $sink['monitor source'];
$this->properties = new PropertyList($sink['properties'], true);
}
public function getProperties()
{
return $this->properties;
}
public function getIndex()
{
return $this->index;
}
public function getName()
{
return $this->name;
}
public function getCard()
{
return $this->card;
}
public function getDriver()
{
return $this->driver;
}
public function getMonitorIndex()
{
return $this->monitor;
}
public function moveToSink(Sink $sink)
{
}
public function createRecorder()
{
return new Recorder($this);
}
}