2 questions regarding LIBVLC audio functionality

This forum is about all development around libVLC.
avi_tal
Blank Cone
Blank Cone
Posts: 19
Joined: 10 Oct 2012 17:49

2 questions regarding LIBVLC audio functionality

Postby avi_tal » 08 Nov 2012 11:01

Dear friends,

I have 2 questions regarding LIBVLC audio manipulations:

1. When I set a "play" callback for the audio, there is no sound. This occurs even if the "play" callback function is empty. Following is my code:
//Set callback:
libvlc_audio_set_callbacks(mpSourceMedia, (libvlc_audio_play_cb)&playMediaAudio, NULL, NULL, NULL, NULL, &contextSourceMedia);
//Play callback:
void playMediaAudio(void *data, void *samples, unsigned count, int64_t pts)
{
}

2. When I use VIRTUAL audio device and rout the audio source to it, the volume control does not work (the virtual audio device HAS volume control) and stays at 100.
I route the audio using the following code:
err = libvlc_audio_output_set(mpSourceMedia, audioDevices[SHARED_CABLE].container_name);
libvlc_audio_output_device_set(mpSourceMedia, audioDevices[SHARED_CABLE].container_name, audioDevices[SHARED_CABLE].device_name);
And set the volume using the following code:
err = libvlc_audio_set_volume( mpSourceMedia, 0 );
Windows handles this device correctly.


Your kind help is greatly appreciated!

Thanks,
Avi.

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

Re: 2 questions regarding LIBVLC audio functionality

Postby Rémi Denis-Courmont » 08 Nov 2012 12:58

Obviously if your play callback does not actually play the samples, there will be no sound to hear...
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

avi_tal
Blank Cone
Blank Cone
Posts: 19
Joined: 10 Oct 2012 17:49

Re: 2 questions regarding LIBVLC audio functionality

Postby avi_tal » 08 Nov 2012 13:05

Dear Remi,

Thanks allot for your reply!

Do you have a sample function that actually plays the sound?

Thanks,

Avi.

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

Re: 2 questions regarding LIBVLC audio functionality

Postby Rémi Denis-Courmont » 08 Nov 2012 17:07

No. The callback prototype is explained in the Doxygen documentation.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 8 guests