Recording kinda working but not quite

This commit is contained in:
2017-02-13 22:50:11 +01:00
parent b347a8e22b
commit efee6d3ef4
12 changed files with 399 additions and 115 deletions

View File

@ -2,6 +2,7 @@
namespace NoccyLabs\PulseAudio\Sink;
use NoccyLabs\PulseAudio\PulseAudio;
use NoccyLabs\PulseAudio\PropertyList;
class Sink
@ -17,12 +18,18 @@ class Sink
protected $properties;
public function __construct($index, array $sink)
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->card = $sink['card'];
$this->driver = $sink['driver'];
$this->monitor = $sink['monitor source'];
$this->properties = new PropertyList($sink['properties'], true);
}
@ -51,10 +58,20 @@ class Sink
return $this->driver;
}
public function getMonitorIndex()
{
return $this->monitor;
}
public function moveToSink(Sink $sink)
{
}
public function createRecorder()
{
return new Recorder($this);
}
}