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

13 lines
283 B
PHP

<?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());
}