Rename ComputeBFormatGains to ComputeFirstOrderGains

This commit is contained in:
Chris Robinson 2016-01-31 09:00:23 -08:00
parent d69dd6dc7a
commit 7f908d90af
6 changed files with 15 additions and 15 deletions

View File

@ -663,7 +663,7 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A
MixGains *gains = voice->Direct.Gains[c];
ALfloat Target[MAX_OUTPUT_CHANNELS];
ComputeBFormatGains(Device->AmbiCoeffs, Device->NumChannels, matrix.m[c], DryGain, Target);
ComputeFirstOrderGains(Device->AmbiCoeffs, Device->NumChannels, matrix.m[c], DryGain, Target);
for(i = 0;i < MAX_OUTPUT_CHANNELS;i++)
gains[i].Target = Target[i];
}
@ -698,8 +698,8 @@ ALvoid CalcNonAttnSourceParams(ALvoice *voice, const ALsource *ALSource, const A
ALfloat Target[MAX_OUTPUT_CHANNELS];
ALuint j;
ComputeBFormatGains(Slot->AmbiCoeffs, Slot->NumChannels,
matrix.m[c], WetGain[i], Target);
ComputeFirstOrderGains(Slot->AmbiCoeffs, Slot->NumChannels,
matrix.m[c], WetGain[i], Target);
for(j = 0;j < MAX_EFFECT_CHANNELS;j++)
gains[j].Target = Target[j];
}

View File

@ -71,8 +71,8 @@ static ALvoid ALcompressorState_update(ALcompressorState *state, const ALCdevice
0.0f, 0.0f, 0.0f, scale
);
for(i = 0;i < 4;i++)
ComputeBFormatGains(device->AmbiCoeffs, device->NumChannels,
matrix.m[i], slot->Gain, state->Gain[i]);
ComputeFirstOrderGains(device->AmbiCoeffs, device->NumChannels,
matrix.m[i], slot->Gain, state->Gain[i]);
}
static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels)

View File

@ -111,8 +111,8 @@ static ALvoid ALequalizerState_update(ALequalizerState *state, const ALCdevice *
0.0f, 0.0f, 0.0f, gain
);
for(i = 0;i < MAX_EFFECT_CHANNELS;i++)
ComputeBFormatGains(device->AmbiCoeffs, device->NumChannels,
matrix.m[i], slot->Gain, state->Gain[i]);
ComputeFirstOrderGains(device->AmbiCoeffs, device->NumChannels,
matrix.m[i], slot->Gain, state->Gain[i]);
/* Calculate coefficients for the each type of filter. Note that the shelf
* filters' gain is for the reference frequency, which is the centerpoint

View File

@ -130,8 +130,8 @@ static ALvoid ALmodulatorState_update(ALmodulatorState *state, const ALCdevice *
0.0f, 0.0f, 0.0f, scale
);
for(i = 0;i < MAX_EFFECT_CHANNELS;i++)
ComputeBFormatGains(Device->AmbiCoeffs, Device->NumChannels,
matrix.m[i], Slot->Gain, state->Gain[i]);
ComputeFirstOrderGains(Device->AmbiCoeffs, Device->NumChannels,
matrix.m[i], Slot->Gain, state->Gain[i]);
}
static ALvoid ALmodulatorState_process(ALmodulatorState *state, ALuint SamplesToDo, const ALfloat (*restrict SamplesIn)[BUFFERSIZE], ALfloat (*restrict SamplesOut)[BUFFERSIZE], ALuint NumChannels)

View File

@ -154,7 +154,7 @@ void ComputePanningGains(const ChannelConfig *chancoeffs, ALuint numchans, const
gains[i] = 0.0f;
}
void ComputeBFormatGains(const ChannelConfig *chancoeffs, ALuint numchans, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS])
void ComputeFirstOrderGains(const ChannelConfig *chancoeffs, ALuint numchans, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS])
{
ALuint i, j;

View File

@ -322,13 +322,13 @@ void ComputeAmbientGains(const ChannelConfig *chancoeffs, ALuint numchans, ALflo
void ComputePanningGains(const ChannelConfig *chancoeffs, ALuint numchans, const ALfloat coeffs[MAX_AMBI_COEFFS], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]);
/**
* ComputeBFormatGains
* ComputeFirstOrderGains
*
* Sets channel gains for a given (first-order) B-Format input channel. The
* matrix is a 1x4 'slice' of the rotation matrix for the given channel used to
* orient the soundfield.
* Sets channel gains for a first-order ambisonics input channel. The matrix is
* a 1x4 'slice' of a transform matrix for the input channel, used to scale and
* orient the sound samples.
*/
void ComputeBFormatGains(const ChannelConfig *chancoeffs, ALuint numchans, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]);
void ComputeFirstOrderGains(const ChannelConfig *chancoeffs, ALuint numchans, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]);
ALvoid UpdateContextSources(ALCcontext *context);