aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-14 08:51:03 -0800
committerChris Robinson <[email protected]>2018-01-14 08:51:03 -0800
commit0152bc0d10901cc60e579e2f7fa6ebf7786e6106 (patch)
tree6b469cdb2eed1775f79b8ee4d1fc0539920f70f0 /Alc
parent7e491ef2b2d58e90ce34eabea21056646aace089 (diff)
Remove the SAFE_CONST macro
Seems compilers are now allowing a pointer-to-type-array to implicitly convert to pointer-to-const-type-array.
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALu.c19
-rw-r--r--Alc/bformatdec.c12
-rw-r--r--Alc/mixer.c4
3 files changed, 15 insertions, 20 deletions
diff --git a/Alc/ALu.c b/Alc/ALu.c
index 2fe579b9..c010ecba 100644
--- a/Alc/ALu.c
+++ b/Alc/ALu.c
@@ -1724,8 +1724,8 @@ void aluMixData(ALCdevice *device, ALvoid *OutBuffer, ALsizei NumSamples)
if(device->AmbiUp)
ambiup_process(device->AmbiUp,
- device->Dry.Buffer, device->Dry.NumChannels,
- SAFE_CONST(ALfloatBUFFERSIZE*,device->FOAOut.Buffer), SamplesToDo
+ device->Dry.Buffer, device->Dry.NumChannels, device->FOAOut.Buffer,
+ SamplesToDo
);
lidx = GetChannelIdxByName(&device->RealOut, FrontLeft);
@@ -1737,8 +1737,7 @@ void aluMixData(ALCdevice *device, ALvoid *OutBuffer, ALsizei NumSamples)
{
MixDirectHrtf(device->RealOut.Buffer[lidx], device->RealOut.Buffer[ridx],
device->Dry.Buffer[c], state->Offset, state->IrSize,
- SAFE_CONST(ALfloat2*,state->Chan[c].Coeffs),
- state->Chan[c].Values, SamplesToDo
+ state->Chan[c].Coeffs, state->Chan[c].Values, SamplesToDo
);
}
state->Offset += SamplesToDo;
@@ -1747,19 +1746,19 @@ void aluMixData(ALCdevice *device, ALvoid *OutBuffer, ALsizei NumSamples)
{
if(device->Dry.Buffer != device->FOAOut.Buffer)
bformatdec_upSample(device->AmbiDecoder,
- device->Dry.Buffer, SAFE_CONST(ALfloatBUFFERSIZE*,device->FOAOut.Buffer),
- device->FOAOut.NumChannels, SamplesToDo
+ device->Dry.Buffer, device->FOAOut.Buffer, device->FOAOut.NumChannels,
+ SamplesToDo
);
bformatdec_process(device->AmbiDecoder,
- device->RealOut.Buffer, device->RealOut.NumChannels,
- SAFE_CONST(ALfloatBUFFERSIZE*,device->Dry.Buffer), SamplesToDo
+ device->RealOut.Buffer, device->RealOut.NumChannels, device->Dry.Buffer,
+ SamplesToDo
);
}
else if(device->AmbiUp)
{
ambiup_process(device->AmbiUp,
- device->RealOut.Buffer, device->RealOut.NumChannels,
- SAFE_CONST(ALfloatBUFFERSIZE*,device->FOAOut.Buffer), SamplesToDo
+ device->RealOut.Buffer, device->RealOut.NumChannels, device->FOAOut.Buffer,
+ SamplesToDo
);
}
else if(device->Uhj_Encoder)
diff --git a/Alc/bformatdec.c b/Alc/bformatdec.c
index 2c5326d4..ae1f7381 100644
--- a/Alc/bformatdec.c
+++ b/Alc/bformatdec.c
@@ -433,12 +433,10 @@ void bformatdec_process(struct BFormatDec *dec, ALfloat (*restrict OutBuffer)[BU
memset(dec->ChannelMix, 0, SamplesToDo*sizeof(ALfloat));
MixMatrixRow(dec->ChannelMix, dec->Matrix.Dual[chan][FB_HighFreq],
- SAFE_CONST(ALfloatBUFFERSIZE*,dec->SamplesHF), dec->NumChannels, 0,
- SamplesToDo
+ dec->SamplesHF, dec->NumChannels, 0, SamplesToDo
);
MixMatrixRow(dec->ChannelMix, dec->Matrix.Dual[chan][FB_LowFreq],
- SAFE_CONST(ALfloatBUFFERSIZE*,dec->SamplesLF), dec->NumChannels, 0,
- SamplesToDo
+ dec->SamplesLF, dec->NumChannels, 0, SamplesToDo
);
for(i = 0;i < SamplesToDo;i++)
@@ -489,8 +487,7 @@ void bformatdec_upSample(struct BFormatDec *dec, ALfloat (*restrict OutBuffer)[B
/* Now write each band to the output. */
MixMatrixRow(OutBuffer[i], dec->UpSampler[i].Gains,
- SAFE_CONST(ALfloatBUFFERSIZE*,dec->Samples), FB_Max, 0,
- SamplesToDo
+ dec->Samples, FB_Max, 0, SamplesToDo
);
}
}
@@ -605,8 +602,7 @@ void ambiup_process(struct AmbiUpsampler *ambiup, ALfloat (*restrict OutBuffer)[
for(j = 0;j < OutChannels;j++)
MixMatrixRow(OutBuffer[j], ambiup->Gains[i][j],
- SAFE_CONST(ALfloatBUFFERSIZE*,ambiup->Samples), FB_Max, 0,
- SamplesToDo
+ ambiup->Samples, FB_Max, 0, SamplesToDo
);
}
}
diff --git a/Alc/mixer.c b/Alc/mixer.c
index b1d859c6..76e5f759 100644
--- a/Alc/mixer.c
+++ b/Alc/mixer.c
@@ -583,7 +583,7 @@ ALboolean MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei
*/
gain = lerp(parms->Hrtf.Old.Gain, parms->Hrtf.Target.Gain,
minf(1.0f, (ALfloat)fademix/Counter));
- hrtfparams.Coeffs = SAFE_CONST(ALfloat2*,parms->Hrtf.Target.Coeffs);
+ hrtfparams.Coeffs = parms->Hrtf.Target.Coeffs;
hrtfparams.Delay[0] = parms->Hrtf.Target.Delay[0];
hrtfparams.Delay[1] = parms->Hrtf.Target.Delay[1];
hrtfparams.Gain = 0.0f;
@@ -612,7 +612,7 @@ ALboolean MixSource(ALvoice *voice, ALsource *Source, ALCdevice *Device, ALsizei
gain = lerp(parms->Hrtf.Old.Gain, gain,
(ALfloat)todo/(Counter-fademix));
- hrtfparams.Coeffs = SAFE_CONST(ALfloat2*,parms->Hrtf.Target.Coeffs);
+ hrtfparams.Coeffs = parms->Hrtf.Target.Coeffs;
hrtfparams.Delay[0] = parms->Hrtf.Target.Delay[0];
hrtfparams.Delay[1] = parms->Hrtf.Target.Delay[1];
hrtfparams.Gain = parms->Hrtf.Old.Gain;