Last parameter of Alc.CaptureSamples should be an int, not IntPtr.

This commit is contained in:
the_fiddler 2009-05-31 11:10:16 +00:00
parent 421fd60105
commit 59d6fca421

View file

@ -311,7 +311,7 @@ namespace OpenTK.Audio
/// <param name="buffer">a pointer to a buffer, which must be large enough to accommodate the number of samples.</param> /// <param name="buffer">a pointer to a buffer, which must be large enough to accommodate the number of samples.</param>
/// <param name="samples">the number of samples to be retrieved.</param> /// <param name="samples">the number of samples to be retrieved.</param>
[DllImport(Alc.Lib, EntryPoint = "alcCaptureSamples", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()] [DllImport(Alc.Lib, EntryPoint = "alcCaptureSamples", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
public static extern void CaptureSamples(IntPtr device, IntPtr buffer, IntPtr samples); public static extern void CaptureSamples(IntPtr device, IntPtr buffer, int samples);
// ALC_API void ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples ); // ALC_API void ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples );
/// <summary>This function completes a capture operation, and does not block.</summary> /// <summary>This function completes a capture operation, and does not block.</summary>
@ -324,7 +324,7 @@ namespace OpenTK.Audio
GCHandle handle = GCHandle.Alloc(buffer, GCHandleType.Pinned); GCHandle handle = GCHandle.Alloc(buffer, GCHandleType.Pinned);
try try
{ {
CaptureSamples(device, handle.AddrOfPinnedObject(), new IntPtr(samples)); CaptureSamples(device, handle.AddrOfPinnedObject(), samples);
} }
finally finally
{ {