AudioCallback Calculate audio level

This forum is about all development around libVLC.
madrianR
New Cone
New Cone
Posts: 1
Joined: 01 Oct 2023 14:38

AudioCallback Calculate audio level

Postby madrianR » 01 Oct 2023 14:43

Hello,

I'm using LibVLCSharp MediaPlayer to shiw RSTP Media Stream - all works fine but now I need to show a audio level meter. I know that
I can use AudioCallback but do not now how to calculate the level...

_mediaPlayer.SetAudioFormatCallback(AudioSetup, AudioCleanup);
_mediaPlayer?.SetAudioCallbacks(AudioCallback, PauseAudio, ResumeAudio, FlushAudio, DrainAudio);

void AudioCallback(IntPtr data, IntPtr samples, uint count, long pts)
{
...?
}


anybody out there whow can help me?

robert

Rémi Denis-Courmont
Developer
Developer
Posts: 15271
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: AudioCallback Calculate audio level

Postby Rémi Denis-Courmont » 01 Oct 2023 18:58

You have the audio samples in the format that you requested. How to measure depends what you want to measure. If you don't know, nobody else will.

Also this forum is about LibVLC, not mathematics, TBH.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

arunp
New Cone
New Cone
Posts: 2
Joined: 19 Oct 2023 00:31

Re: AudioCallback Calculate audio level

Postby arunp » 19 Oct 2023 00:55

I am facing issue in audiobargraph in c#
"--audio-filter=audiobargraph_a","--audiobargraph_a-bargraph=1","--sub-source=audiobargraph_v"
using above options but no audio bar graph is displayed
Just i can see the axis but not audio level bar graph


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 16 guests