mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-01 00:21:14 +00:00
use explicit array access in fluid_synth_nwrite_float()
rather than pointer arithmetic
This commit is contained in:
parent
6bcdf87c06
commit
ce337e2497
1 changed files with 4 additions and 4 deletions
|
@ -2972,8 +2972,8 @@ fluid_synth_nwrite_float(fluid_synth_t* synth, int len,
|
|||
|
||||
for (i = 0; i < synth->audio_channels; i++) {
|
||||
#ifdef WITH_FLOAT
|
||||
FLUID_MEMCPY(left[i], &left_in[i * FLUID_BUFSIZE * FLUID_MIXER_MAX_BUFFERS_DEFAULT] + synth->cur, bytes);
|
||||
FLUID_MEMCPY(right[i], &right_in[i * FLUID_BUFSIZE * FLUID_MIXER_MAX_BUFFERS_DEFAULT] + synth->cur, bytes);
|
||||
FLUID_MEMCPY(left[i], &left_in[i * FLUID_BUFSIZE * FLUID_MIXER_MAX_BUFFERS_DEFAULT + synth->cur], bytes);
|
||||
FLUID_MEMCPY(right[i], &right_in[i * FLUID_BUFSIZE * FLUID_MIXER_MAX_BUFFERS_DEFAULT + synth->cur], bytes);
|
||||
#else //WITH_FLOAT
|
||||
int j;
|
||||
for (j = 0; j < num; j++) {
|
||||
|
@ -2987,10 +2987,10 @@ fluid_synth_nwrite_float(fluid_synth_t* synth, int len,
|
|||
{
|
||||
#ifdef WITH_FLOAT
|
||||
if(fx_left != NULL)
|
||||
FLUID_MEMCPY(fx_left[i], &fx_left_in[i * FLUID_BUFSIZE * FLUID_MIXER_MAX_BUFFERS_DEFAULT] + synth->cur, bytes);
|
||||
FLUID_MEMCPY(fx_left[i], &fx_left_in[i * FLUID_BUFSIZE * FLUID_MIXER_MAX_BUFFERS_DEFAULT + synth->cur], bytes);
|
||||
|
||||
if(fx_right != NULL)
|
||||
FLUID_MEMCPY(fx_right[i], &fx_right_in[i * FLUID_BUFSIZE * FLUID_MIXER_MAX_BUFFERS_DEFAULT] + synth->cur, bytes);
|
||||
FLUID_MEMCPY(fx_right[i], &fx_right_in[i * FLUID_BUFSIZE * FLUID_MIXER_MAX_BUFFERS_DEFAULT + synth->cur], bytes);
|
||||
#else //WITH_FLOAT
|
||||
int j;
|
||||
if(fx_left != NULL) {
|
||||
|
|
Loading…
Reference in a new issue