php-pulseaudio/examples/list-sinks.php

13 lines
295 B
PHP
Raw Permalink 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();
$sinks = $pulse->getSinks();
foreach ($sinks as $sink) {
printf(" [#%d] %s => %s (%s)\n", $sink->getIndex(), $sink->getName(), $sink->getCard(), $sink->getDriver());
}