php-pulseaudio/examples/list-sink-inputs.php

13 lines
283 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();
$inputs = $pulse->getSinkInputs();
foreach ($inputs as $input) {
printf(" [#%d] %s => %s\n", $input->getIndex(), $input->getClient(), $input->getSink());
}