/* IntPtr refers to a Mix_Chunk* */ /* This is an RWops macro in the C header. */ public static IntPtr Mix_LoadWAV(string file) { #if NETSTANDARD1_4 IntPtr filePtr = LPUtf8StrMarshaler.GetInstance(null).MarshalManagedToNative(file); IntPtr rbPtr = LPUtf8StrMarshaler.GetInstance(null).MarshalManagedToNative("rb"); IntPtr rwops = SDL.INTERNAL_SDL_RWFromFile(filePtr, rbPtr); Marshal.FreeHGlobal(rbPtr); Marshal.FreeHGlobal(filePtr); #else IntPtr rwops = SDL.INTERNAL_SDL_RWFromFile(file, "rb"); #endif return(Mix_LoadWAV_RW(rwops, 1)); }
/* IntPtr refers to a Mix_Chunk* */ /* This is an RWops macro in the C header. */ public static IntPtr Mix_LoadWAV(string file) { IntPtr rwops = SDL.INTERNAL_SDL_RWFromFile(file, "rb"); return(Mix_LoadWAV_RW(rwops, 1)); }
public static int SDL_SavePNG(IntPtr surface, string filename) { return(SDL_SavePNG_RW(surface, SDL.INTERNAL_SDL_RWFromFile(filename, "wb"), true)); }
public static IntPtr SDL_LoadPNG(string filename) { return(SDL_LoadPNG_RW(SDL.INTERNAL_SDL_RWFromFile(filename, "rb"), true)); }