private static extern uint INTERNAL_OpenAudioDevice( byte[] device, int iscapture, ref AudioSpec desired, out AudioSpec obtained, int allowed_changes );
private static extern IntPtr INTERNAL_LoadWAV_RW( IntPtr src, int freesrc, ref AudioSpec spec, out IntPtr audio_buf, out uint audio_len );
public static uint OpenAudioDevice( string device, int iscapture, ref AudioSpec desired, out AudioSpec obtained, int allowed_changes ) { return(INTERNAL_OpenAudioDevice( UTF8_ToNative(device), iscapture, ref desired, out obtained, allowed_changes )); }
public static AudioSpec LoadWAV( string file, ref AudioSpec spec, out IntPtr audio_buf, out uint audio_len ) { AudioSpec result; IntPtr rwops = RWFromFile(file, "rb"); IntPtr result_ptr = INTERNAL_LoadWAV_RW( rwops, 1, ref spec, out audio_buf, out audio_len ); result = (AudioSpec)Marshal.PtrToStructure( result_ptr, typeof(AudioSpec) ); return(result); }
public static extern int OpenAudio( ref AudioSpec desired, IntPtr obtained );
public static extern int OpenAudio( ref AudioSpec desired, out AudioSpec obtained );