Hello,
Not sure if 3.8.3 or 3.8.4 is where this started. I have tested with 3.8.2.3 and no problems. When starting the player, shortly after requesting output interface from plug-in (xmp-apx), there is an access violation reading 0x00000001. If I remove xmp-apx.dll there is no issue starting. I do not have symbols for xmplay.exe so I can't say much more.
I tried updating the xmpout.h and xmpfunc.h from the SDK. I saw only minor changes for 3.8.2 in xmpfunc.h, but applied them nonetheless. No difference before or after.
I set breakpoints in each of my interface callbacks and did not see any additional calls. I don't know if my callback interface is supposed to have a new function pointer at the end or what exactly.
All this code runs normally and shortly after returning the XMPOUT pointer from this function, XMPlay tries to access a nullptr:
extern "C" __declspec(dllexport) XMPOUT* XMPOUT_GetInterface(DWORD face,
InterfaceProc faceproc)
{
if (face == 0)
{
Debugger::print("Player requesting plug-in interface...");
// initialize output interface singleton
static XMPOUT out = {
0, // flags
"Devices", // label
Output::optionsDialogProc,
Output::getName,
Output::getFlags,
Output::open,
Output::close,
Output::reset,
Output::setPaused,
Output::setVolumeAndBalance,
Output::canWrite,
Output::write,
Output::getBuffered,
nullptr, // getGeneralInfo
Output::onNewTrack
};
if (player == nullptr)
{
// initialize player interface singleton
player.reset(new XMPlayPlayer(
(XMPFUNC_MISC*) faceproc(XMPFUNC_MISC_FACE),
(XMPFUNC_STATUS*) faceproc(XMPFUNC_STATUS_FACE)));
// initialize plug-in options file path
CHAR pathBuffer[MAX_PATH];
if (SUCCEEDED(SHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, pathBuffer)))
{
iniFilePath.assign(pathBuffer);
iniFilePath.append("\\");
iniFilePath.append(Plugin::name());
SHCreateDirectoryExA(NULL, iniFilePath.c_str(), NULL);
iniFilePath.append("\\plugin.ini");
}
else
{
DWORD pathLength = GetModuleFileNameA(dllInstance, pathBuffer, MAX_PATH);
if (pathLength > 0 && pathLength <= MAX_PATH)
{
const std::string pathString(pathBuffer, pathLength);
const auto pos = pathString.find_last_of('\\');
if (pos != std::string::npos)
iniFilePath.assign(pathString.substr(0, pos + 1));
}
iniFilePath.append("xmplay.ini");
}
// load plug-in options from file
OptionsUtils::loadOptions(iniFilePath);
}
return &out;
}
return nullptr;
}