I'm currently developing a karaoke system with c# and using LibVLCSharp. Can anyone please help me how to change audio pitch shifter with it?
There's libscaletempo_plugin and libscaletempo_pitch_plugin module in \libvlc\win-x86\plugins\audio_filter directory. How can I apply audio filter modules in LibVLCSharp ?
Had tried following but it doesn't work.
Core.Initialize();
LibVLC libVlc = new LibVLC();
mp1 = new MediaPlayer(libVlc);
mp1.Hwnd = pictureBox1.Handle;
Media media = new Media(libVlc, @"c:\testsong.mp4", FromType.FromPath);
media.AddOption("--audio-filter=scaletempo_pitch");
media.AddOption("--pitch-shift=5");
mp1.Play(media);
and tried this, it doesn't work.
...
...
media.AddOption(":audio-filter=scaletempo_pitch");
media.AddOption(":pitch-shift=5");
mp1.Play(media);
and tried this, it doesn't work also.
Core.Initialize();
string[] options = { "--audio-filter=scaletempo_pitch", "--pitch-shift=5" };
LibVLC libVlc = new LibVLC(options);
mp1 = new MediaPlayer(libVlc);
mp1.Hwnd = pictureBox1.Handle;
Media media = new Media(libVlc, @"c:\testsong.mp4", FromType.FromPath);
mp1.Play(media);
I've searching through but cannot find the solution to apply audio filter with pitch shift. What i need is a function that can be called to pass in audio pitch shift value, from -12 to 12, when the media is playing.
Thanks in advance.
Below is my sample code to try out the VLC pitch shift. Does anyone know how to use
PlayCallback()function inSetAudioCallbacks? Any sample or reference for C# ?