pulseaudio check if runnings

C++
pactl list

Source

Also in C++: