OpenTK: Simplify OpenAL bufferdata

This commit is contained in:
Blue 2020-09-19 19:32:08 +02:00
parent 87ee1af1f9
commit f8c5fe39df

View file

@ -47,10 +47,7 @@ namespace ProjectPSX.OpenTK {
if (queueLength < 5) {
alBuffer = AL.GenBuffer();
fixed (byte* s = samples) {
IntPtr ptr = (IntPtr)s;
AL.BufferData(alBuffer, ALFormat.Stereo16, s, samples.Length, 44100);
}
AL.BufferData(alBuffer, ALFormat.Stereo16, samples, 44100);
AL.SourceQueueBuffer(audioSource, alBuffer);
queueLength++;
}