Original date:2021-03-11 00:17:21 Edited by: Icy_Viking Subject: SoLoud Wrapper

Hello All,

I am currently working on a wrapper of SoLoud for Euphoria. It is an audio library. I just want to make sure I am wrapping the functions correctly. It has a C-API.

Its the way pointers are init that is throwing me off, just wanna make sure I won't need to do anything special when making a wrapper for Eu.

C Code 
void * Soloud_create() 
  return (void *)new Soloud; 
int Soloud_init(void * aClassPtr) 
	Soloud * cl = (Soloud *)aClassPtr; 
	return cl->init(); 

atom sol 
ifdef WIN32 then 
	sol = open_dll("soloud_x86.dll") 
	elsifdef LINUX or FREEBSD then 
	sol = open_dll("") 
end ifdef 
public constant xSoloud_create = define_c_func(sol,"+Soloud_create",{},C_POINTER) 
public function Soloud_create() 
 return c_func(xSoloud_create,{}) 
end function 
public constant xSoloud_init = define_c_func(sol,"+Soloud_init",{C_POINTER},C_INT) 
public function Soloud_init(atom ptr) 
 return c_func(xSoloud_init,{ptr}) 
end function 
Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu