Watch
2
0
Fork
You've already forked raylib-cs
0
raylib-cs/Raylib-cs/types/AudioMixed.cs
Matorio 9811c0d129 Ordering readings
Added "SaveFileData" overload to "Raylib.Utils"
Moved "SaveFileText" from "RaylibExtensions" to "Raylib.Utils"
Moved "LoadFileText" from "RaylibExtensions" to "Raylib.Utils"
Raymath's const "NativeLibName" is now referencing to "Raylib.NativeLibName"
Color constructors are more readable
Added "Dimensions" property to "Image"
Changed all the "var" for explicit types on the "Logging" class
Changed "Int64" for "long" on CBool, and using constructor on the operators instead setting the value manually
Added indexer to "FilePathLists"
Changed all "var" for explicit types on "Utf8Buffer"
New "GetRandomSequence" method overloads in "Raylib.Utils" acepting "int" and "float"
2025-07-15 17:17:41 -05:00

21 lines
588 B
C#

using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System;
namespace Raylib_cs;
internal static unsafe class AudioMixed
{
public static AudioCallback<float> Callback = null;
[UnmanagedCallersOnly(CallConvs = new Type[]
{ typeof(CallConvCdecl) })]
public static void Processor(void* buffer, uint frames)
{
// The buffer is stereo audio, so we need to double our frame count.
frames = Math.Min(frames * 2, int.MaxValue);
Span<float> floats = new(buffer, (int)frames);
Callback?.Invoke(floats);
}
}