Initial commit
This commit is contained in:
19
examples/list-modules.php
Normal file
19
examples/list-modules.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__."/../vendor/autoload.php";
|
||||
|
||||
use NoccyLabs\PulseAudio\PulseAudio;
|
||||
|
||||
$pulse = new PulseAudio();
|
||||
$modules = $pulse->getModules();
|
||||
|
||||
echo "Loaded modules:\n";
|
||||
foreach ($modules as $module) {
|
||||
echo " - ".$module->getName()."\n";
|
||||
}
|
||||
|
||||
|
||||
// $ret = Pacmd::query("list-sinks");
|
||||
// echo json_encode($ret, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
|
||||
|
||||
|
12
examples/list-sink-inputs.php
Normal file
12
examples/list-sink-inputs.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__."/../vendor/autoload.php";
|
||||
|
||||
use NoccyLabs\PulseAudio\PulseAudio;
|
||||
|
||||
$pulse = new PulseAudio();
|
||||
$inputs = $pulse->getSinkInputs();
|
||||
|
||||
foreach ($inputs as $input) {
|
||||
printf(" [#%d] %s => %s\n", $input->getIndex(), $input->getClient(), $input->getSink());
|
||||
}
|
12
examples/list-sinks.php
Normal file
12
examples/list-sinks.php
Normal file
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__."/../vendor/autoload.php";
|
||||
|
||||
use NoccyLabs\PulseAudio\PulseAudio;
|
||||
|
||||
$pulse = new PulseAudio();
|
||||
$sinks = $pulse->getSinks();
|
||||
|
||||
foreach ($sinks as $sink) {
|
||||
printf(" [#%d] %s => %s (%s)\n", $sink->getIndex(), $sink->getName(), $sink->getCard(), $sink->getDriver());
|
||||
}
|
Reference in New Issue
Block a user