diff options
author | Chris Robinson <[email protected]> | 2018-09-19 21:31:46 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-09-19 21:31:46 -0700 |
commit | ea95a8adef036602770546fb14bcaf713ec40b8b (patch) | |
tree | c6f1031e1896d7bde80903e66124330b85613593 /Alc | |
parent | 6eb980d1b23bec90226b2012a0346f7be8407fdd (diff) |
Combine nearly-duplicate structures
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALu.c | 6 | ||||
-rw-r--r-- | Alc/panning.c | 10 |
2 files changed, 8 insertions, 8 deletions
@@ -644,7 +644,7 @@ static void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALflo NfcFilterAdjust(&voice->Direct.Params[0].NFCtrlFilter, w0); for(i = 0;i < MAX_AMBI_ORDER+1;i++) - voice->Direct.ChannelsPerOrder[i] = Device->Dry.NumChannelsPerOrder[i]; + voice->Direct.ChannelsPerOrder[i] = Device->NumChannelsPerOrder[i]; voice->Flags |= VOICE_HAS_NFC; } @@ -888,7 +888,7 @@ static void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALflo NfcFilterAdjust(&voice->Direct.Params[c].NFCtrlFilter, w0); for(i = 0;i < MAX_AMBI_ORDER+1;i++) - voice->Direct.ChannelsPerOrder[i] = Device->Dry.NumChannelsPerOrder[i]; + voice->Direct.ChannelsPerOrder[i] = Device->NumChannelsPerOrder[i]; voice->Flags |= VOICE_HAS_NFC; } @@ -949,7 +949,7 @@ static void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALflo NfcFilterAdjust(&voice->Direct.Params[c].NFCtrlFilter, w0); for(i = 0;i < MAX_AMBI_ORDER+1;i++) - voice->Direct.ChannelsPerOrder[i] = Device->Dry.NumChannelsPerOrder[i]; + voice->Direct.ChannelsPerOrder[i] = Device->NumChannelsPerOrder[i]; voice->Flags |= VOICE_HAS_NFC; } diff --git a/Alc/panning.c b/Alc/panning.c index 6bd42709..0ddfd07e 100644 --- a/Alc/panning.c +++ b/Alc/panning.c @@ -41,8 +41,8 @@ extern inline void CalcDirectionCoeffs(const ALfloat dir[3], ALfloat spread, ALfloat coeffs[MAX_AMBI_COEFFS]); extern inline void CalcAngleCoeffs(ALfloat azimuth, ALfloat elevation, ALfloat spread, ALfloat coeffs[MAX_AMBI_COEFFS]); extern inline float ScaleAzimuthFront(float azimuth, float scale); -extern inline void ComputeDryPanGains(const DryMixParams *dry, const ALfloat coeffs[MAX_AMBI_COEFFS], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); -extern inline void ComputeFirstOrderGains(const BFMixParams *foa, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); +extern inline void ComputeDryPanGains(const MixParams *dry, const ALfloat coeffs[MAX_AMBI_COEFFS], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); +extern inline void ComputeFirstOrderGains(const MixParams *foa, const ALfloat mtx[4], ALfloat ingain, ALfloat gains[MAX_OUTPUT_CHANNELS]); static const ALsizei FuMa2ACN[MAX_AMBI_COEFFS] = { @@ -396,9 +396,9 @@ static void InitNearFieldCtrl(ALCdevice *device, ALfloat ctrl_dist, ALsizei orde TRACE("Using near-field reference distance: %.2f meters\n", device->AvgSpeakerDist); for(i = 0;i < order+1;i++) - device->Dry.NumChannelsPerOrder[i] = chans_per_order[i]; + device->NumChannelsPerOrder[i] = chans_per_order[i]; for(;i < MAX_AMBI_ORDER+1;i++) - device->Dry.NumChannelsPerOrder[i] = 0; + device->NumChannelsPerOrder[i] = 0; } } @@ -943,7 +943,7 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf device->Dry.CoeffCount = 0; device->Dry.NumChannels = 0; for(i = 0;i < MAX_AMBI_ORDER+1;i++) - device->Dry.NumChannelsPerOrder[i] = 0; + device->NumChannelsPerOrder[i] = 0; device->AvgSpeakerDist = 0.0f; memset(device->ChannelDelay, 0, sizeof(device->ChannelDelay)); |