mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-02-02 20:01:14 +00:00
Last parameter of Alc.CaptureSamples should be an int, not IntPtr.
This commit is contained in:
parent
421fd60105
commit
59d6fca421
|
@ -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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue