Page 1 of 1

libvlc_audio_play_cb functionality

Posted: 22 Aug 2014 23:50
by jdwiegman
I am writing a utility that needs to use the audio samples (for example, for visualization).

I have code working using libvlc_audio_play_cb and my callback function, but obviously this stops VLC's play-out mechanism. Is there a way to just have my function decorate or augment VLC's native play, or do I need to write my own player functionality if I want to do this?

Re: libvlc_audio_play_cb functionality

Posted: 09 Sep 2014 00:31
by jdwiegman
I am thinking libvlc_audio_play_cb isn't the right mechanism for this. My samples are getting the volume adjustment. Is there another/better method to get access to the raw decoded audio packets?

Re: libvlc_audio_play_cb functionality

Posted: 09 Sep 2014 20:10
by RĂ©mi Denis-Courmont
You can register a volume callback with libvlc_audio_set_volume_callback() if you don't want LibVLC to perform amplification.

There are intrinsically no ways to perform play back in LibVLC while capturing audio samples. You would need to use the version-dependent plugin API and write an audio filter.