Add restrict to audio mono/stereo cgo methods
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2022-07-15 19:39:11 +02:00
parent 894d8db697
commit 915e8dd213
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -1,7 +1,7 @@
#include "audio.h"
#include <math.h>
void audio_multiple_channels_to_mono(float* buffer, size_t buffer_len, float* out, int channels) {
void audio_multiple_channels_to_mono(float* restrict buffer, size_t buffer_len, float* restrict out, int channels) {
float f;
switch(channels) {
case 1:
@ -23,7 +23,7 @@ void audio_multiple_channels_to_mono(float* buffer, size_t buffer_len, float* ou
}
}
void audio_multiple_channels_to_stereo(float* buffer, size_t buffer_len, float* out, int channels) {
void audio_multiple_channels_to_stereo(float* restrict buffer, size_t buffer_len, float* restrict out, int channels) {
float f;
int samples = 0;
float surroundMix = 1 / sqrt(2);