P
P
programmer01012019-06-17 02:59:16
linux
programmer0101, 2019-06-17 02:59:16

Are there libraries for PHP (maybe even PECL) to work with sound (connect to PulseAudio)?

Send him bits in real time for playback. It is necessary to make a player in PHP (such a simple task) (and there are zero libraries). Also are there libraries to easily accept bits from ogg format?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Philipp, 2019-06-17
@zoonman

1. Learning PulseAudio, especially D-Bus.
https://gavv.github.io/articles/pulseaudio-under-t...
2. We control everything via D-Bus
https://github.com/derickr/pecl-dbus
You can also read about self-written PHP extensions and make your own for playback based on this example https://freedesktop.org/software/pulseaudio/doxyge...
An alternative approach is to control another program through some kind of IPC.
For example https://milesalan.com/notes/mplayers-fifo/
https://github.com/TheJosh/mplayer-web-remote/blob...

A
Anton Shamanov, 2019-06-17
@SilenceOfWinter

php is a server\console language, it is not particularly suitable for this task.
This is only possible in conjunction with js / html or through com or something similar, and not directly

V
Vladimir Protsenko, 2019-06-17
@grayfolk

The task is not particularly clear, but in any case, take a look:
https://www.sourcefabric.org/en/airtime/
https://www.azuracast.com/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question