For some reason, that doesn't seem to work. What I did get to work, was calling config_PutPsz like so:doublemax wrote: ↑Thu Nov 14, 2019 11:26 pm I haven't tried it with soundfonts, but usually you can pass the same command line options to libvlc that you can pass to the VLC exe. (In the call to libvlc_new).
https://wiki.videolan.org/VLC_command-line_helpCode: Select all
--soundfont=<string> SoundFont file
Code: Select all
config_PutPsz((vlc_object_t*)vlc_inst,"soundfont","path/to/soundfont.sf2");
Bu on windows there's a slight problem. Those headers refer to a poll function that only exists on unix style systems and isn't declared in any windows header. In the vlc sources, it appears they work around this by declaring the function for windows in the file vlc_fixups.h. But that file is not a part of the headers that are come with the libvlc sdk. Googling shows it's been pointed out at least a few times, but they don't seem to be interested in fixing it.
To get around this, I borrowed the declaration from vlc_fixups.h and pasted it into another file I named pollshim.h:
Code: Select all
#ifndef POLLSHIM_H_INCLUDED
#define POLLSHIM_H_INCLUDED
#ifdef __WXMSW__
struct pollfd;
int poll (struct pollfd *, unsigned, int);
#endif
#endif // POLLSHIM_H_INCLUDED
Code: Select all
#include "pollshim.h"
#include <vlc/plugins/vlc_common.h>
#include <vlc/plugins/vlc_configuration.h>