soloud icon indicating copy to clipboard operation
soloud copied to clipboard

AY load wrappers missing from C API.

Open woollybah opened this issue 4 years ago • 0 comments

The C API appears to be missing the load functions for the new AY audio source.

Maybe it needs something like this? -

int Ay_load(void * aClassPtr, const char * aFilename)
{
	Ay * cl = (Ay *)aClassPtr;
	return cl->load(aFilename);
}

int Ay_loadMem(void * aClassPtr, const unsigned char * aMem, unsigned int aLength)
{
	Ay * cl = (Ay *)aClassPtr;
	return cl->loadMem(aMem, aLength, false, true);
}

int Ay_loadMemEx(void * aClassPtr, const unsigned char * aMem, unsigned int aLength, int aCopy, int aTakeOwnership)
{
	Ay * cl = (Ay *)aClassPtr;
	return cl->loadMem(aMem, aLength, !!aCopy, !!aTakeOwnership);
}

int Ay_loadFile(void * aClassPtr, File * aFile)
{
	Ay * cl = (Ay *)aClassPtr;
	return cl->loadFile(aFile);
}

woollybah avatar Jul 15 '20 08:07 woollybah