php-pulseaudio/examples/list-modules.php

20 lines
366 B
PHP
Raw Normal View History

2017-02-13 01:53:48 +00:00
<?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);