Coding a pulseaudio vu meter in C, need some pointers.

Before I start, I must say my coding skills are rookie and for the most part I threw this together from looking at other examples and lots of trial and error.

Now with that out of the way, here's the code I have written so far.

With this I successfully connect to a sink and record it, my problem is that I'm lost as to how to get the volume value out. If I try printing anything from the read function, I just get a bunch of repeating number sequences printing at a seconds' interval.

I'm not asking for someone to finish writing it for me, I just want some help, pointers as to what I should look in to. Also, I know of the pavumeter, pacat, async api playback example and python pulseaudio vumeter code. I've been following them, but I still can't get proper output.

All help is greatly appreciated!

EDIT: I Got it working! If there are anyone who needs it, I can post the code.

Posted Jun 16, 2017, 7:19 PM UTC · edited

77
Loading comments…