Merge pull request #68 from Villermen/patch-1

Make Mix_LoadWAV_RW public
This commit is contained in:
Ethan Lee 2014-07-07 16:11:23 -04:00
commit 650fa8e44a

View file

@ -172,19 +172,19 @@ namespace SDL2
out int channels out int channels
); );
/* These are for Mix_LoadWAV, which is a macro in the C header.
* THIS IS AN RWops FUNCTION!
*/
/* IntPtr refers to a Mix_Chunk* */ /* IntPtr refers to a Mix_Chunk* */
[DllImport(nativeLibName, EntryPoint = "Mix_LoadWAV_RW", CallingConvention = CallingConvention.Cdecl)] /* THIS IS AN RWops FUNCTION! */
private static extern IntPtr INTERNAL_Mix_LoadWAV_RW( [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr Mix_LoadWAV_RW(
IntPtr src, IntPtr src,
int freesrc int freesrc
); );
/* IntPtr refers to a Mix_Chunk* */
public static IntPtr Mix_LoadWAV(string file) public static IntPtr Mix_LoadWAV(string file)
{ {
IntPtr rwops = SDL.INTERNAL_SDL_RWFromFile(file, "rb"); IntPtr rwops = SDL.INTERNAL_SDL_RWFromFile(file, "rb");
return INTERNAL_Mix_LoadWAV_RW(rwops, 1); return Mix_LoadWAV_RW(rwops, 1);
} }
/* IntPtr refers to a Mix_Music* */ /* IntPtr refers to a Mix_Music* */