Page 1 of 1

Using libvlc in application --directx option has no effect

Posted: 04 Jun 2008 19:42
by jleroux61
Hi,
I used the libvlc.cs implemention posted here:viewtopic.php?t=28553
I am using this in a WPF application. I want to test whether I can play music through different devices in parallel. This is for a home server application.
I discovered that the --directx-audio-device= option has no effect. The content will play but always on the device that has been selected in the vlc.exe application. Any idea whether this is a bug or am I doing something wrong?

Here is my code:

private void button1_Click(object sender, RoutedEventArgs e)
{
string[] strInitOptions = { "vlc",
"--no-one-instance",
"--no-loop",
"--no-drop-late-frames",
"--disable-screensaver",
"--aout aout_directx",
"--directx-audio-device=3",
};
LibVlc.LibVlc player = new LibVlc.LibVlc();
player.Initialize();
player.AddTarget(@"C:\Users\Public\Music\Sample Music\Amanda.wma", strInitOptions);
player.Play();
}

private void button2_Click(object sender, RoutedEventArgs e)
{
string[] strInitOptions = { "vlc",
"--no-one-instance",
"--no-loop",
"--no-drop-late-frames",
"--disable-screensaver",
"--aout aout_directx",
"--directx-audio-device=2",
};
LibVlc.LibVlc player = new LibVlc.LibVlc();
player.Initialize();
player.AddTarget(@"C:\Users\Public\Music\Sample Music\Despertar.wma", strInitOptions);
player.Play();
}
This code runs. When you click each button, the two files will play but always on the same device. The one specified in vlc.exe. So the --directx-audio-device= option has no effect.