mirror of
				https://github.com/raylib-cs/raylib-cs
				synced 2025-11-02 05:06:44 -05:00 
			
		
		
		
	Fixed typo
- AudioStream and VrDeviceInfo should be structs not classes. - Added [SuppressUnmanagedSecurity] to Raylib class. Should improve performance(untested).
This commit is contained in:
		@@ -4,6 +4,7 @@ using System;
 | 
				
			|||||||
using System.Collections.Generic;
 | 
					using System.Collections.Generic;
 | 
				
			||||||
using System.IO;
 | 
					using System.IO;
 | 
				
			||||||
using System.Runtime.InteropServices;
 | 
					using System.Runtime.InteropServices;
 | 
				
			||||||
 | 
					using System.Security;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace Raylib
 | 
					namespace Raylib
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@@ -687,7 +688,7 @@ namespace Raylib
 | 
				
			|||||||
    // Audio stream type
 | 
					    // Audio stream type
 | 
				
			||||||
    // NOTE: Useful to create custom audio streams not bound to a specific file
 | 
					    // NOTE: Useful to create custom audio streams not bound to a specific file
 | 
				
			||||||
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
 | 
					    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
 | 
				
			||||||
    public class AudioStream
 | 
					    public struct AudioStream
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        public uint sampleRate;
 | 
					        public uint sampleRate;
 | 
				
			||||||
        public uint sampleSize;
 | 
					        public uint sampleSize;
 | 
				
			||||||
@@ -701,7 +702,7 @@ namespace Raylib
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    // Head-Mounted-Display device parameters
 | 
					    // Head-Mounted-Display device parameters
 | 
				
			||||||
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
 | 
					    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
 | 
				
			||||||
    public class VrDeviceInfo
 | 
					    public struct VrDeviceInfo
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        public int hResolution;
 | 
					        public int hResolution;
 | 
				
			||||||
        public int vResolution;
 | 
					        public int vResolution;
 | 
				
			||||||
@@ -717,6 +718,7 @@ namespace Raylib
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    #endregion
 | 
					    #endregion
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    [SuppressUnmanagedCodeSecurity]
 | 
				
			||||||
    public static partial class Raylib
 | 
					    public static partial class Raylib
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        #region Raylib-cs Variables
 | 
					        #region Raylib-cs Variables
 | 
				
			||||||
@@ -2391,7 +2393,7 @@ namespace Raylib
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        // Update audio stream buffers with data
 | 
					        // Update audio stream buffers with data
 | 
				
			||||||
        [DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
 | 
					        [DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
 | 
				
			||||||
        public static extern void UpdateAudioStream(AudioStream stream, byte[] data, int samplesCount);
 | 
					        public static extern void UpdateAudioStream(AudioStream stream, short[] data, int samplesCount);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Close audio stream and free memory
 | 
					        // Close audio stream and free memory
 | 
				
			||||||
        [DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
 | 
					        [DllImport(nativeLibName,CallingConvention = CallingConvention.Cdecl)]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user