Clean up some unnecessary specifiers
This commit is contained in:
+2
-2
@@ -2418,8 +2418,8 @@ ALCdevice_struct::~ALCdevice_struct()
|
||||
if(HrtfHandle)
|
||||
Hrtf_DecRef(HrtfHandle);
|
||||
HrtfHandle = nullptr;
|
||||
al_free(Hrtf);
|
||||
Hrtf = nullptr;
|
||||
al_free(mHrtfState);
|
||||
mHrtfState = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+4
-8
@@ -109,22 +109,18 @@ namespace {
|
||||
|
||||
void ProcessHrtf(ALCdevice *device, ALsizei SamplesToDo)
|
||||
{
|
||||
DirectHrtfState *state;
|
||||
int lidx, ridx;
|
||||
ALsizei c;
|
||||
|
||||
if(device->AmbiUp)
|
||||
ambiup_process(device->AmbiUp.get(),
|
||||
device->Dry.Buffer, device->Dry.NumChannels, device->FOAOut.Buffer,
|
||||
SamplesToDo
|
||||
);
|
||||
|
||||
lidx = GetChannelIdxByName(&device->RealOut, FrontLeft);
|
||||
ridx = GetChannelIdxByName(&device->RealOut, FrontRight);
|
||||
int lidx{GetChannelIdxByName(&device->RealOut, FrontLeft)};
|
||||
int ridx{GetChannelIdxByName(&device->RealOut, FrontRight)};
|
||||
assert(lidx != -1 && ridx != -1);
|
||||
|
||||
state = device->Hrtf;
|
||||
for(c = 0;c < device->Dry.NumChannels;c++)
|
||||
DirectHrtfState *state{device->mHrtfState};
|
||||
for(ALsizei c{0};c < device->Dry.NumChannels;c++)
|
||||
{
|
||||
MixDirectHrtf(device->RealOut.Buffer[lidx], device->RealOut.Buffer[ridx],
|
||||
device->Dry.Buffer[c], state->Offset, state->IrSize,
|
||||
|
||||
+6
-6
@@ -36,18 +36,18 @@ struct Hrtf {
|
||||
};
|
||||
|
||||
|
||||
typedef struct HrtfState {
|
||||
struct HrtfState {
|
||||
alignas(16) ALfloat History[HRTF_HISTORY_LENGTH];
|
||||
alignas(16) ALfloat Values[HRIR_LENGTH][2];
|
||||
} HrtfState;
|
||||
};
|
||||
|
||||
typedef struct HrtfParams {
|
||||
struct HrtfParams {
|
||||
alignas(16) ALfloat Coeffs[HRIR_LENGTH][2];
|
||||
ALsizei Delay[2];
|
||||
ALfloat Gain;
|
||||
} HrtfParams;
|
||||
};
|
||||
|
||||
typedef struct DirectHrtfState {
|
||||
struct DirectHrtfState {
|
||||
/* HRTF filter state for dry buffer content */
|
||||
ALsizei Offset;
|
||||
ALsizei IrSize;
|
||||
@@ -55,7 +55,7 @@ typedef struct DirectHrtfState {
|
||||
alignas(16) ALfloat Values[HRIR_LENGTH][2];
|
||||
alignas(16) ALfloat Coeffs[HRIR_LENGTH][2];
|
||||
} Chan[];
|
||||
} DirectHrtfState;
|
||||
};
|
||||
|
||||
struct AngularPoint {
|
||||
ALfloat Elev;
|
||||
|
||||
+4
-4
@@ -857,7 +857,7 @@ static void InitHrtfPanning(ALCdevice *device)
|
||||
count = COUNTOF(IndexMap);
|
||||
}
|
||||
|
||||
device->Hrtf = reinterpret_cast<DirectHrtfState*>(
|
||||
device->mHrtfState = reinterpret_cast<DirectHrtfState*>(
|
||||
al_calloc(16, FAM_SIZE(DirectHrtfState, Chan, count)));
|
||||
|
||||
for(i = 0;i < count;i++)
|
||||
@@ -892,7 +892,7 @@ static void InitHrtfPanning(ALCdevice *device)
|
||||
device->RealOut.NumChannels = ChannelsFromDevFmt(device->FmtChans, device->mAmbiOrder);
|
||||
|
||||
BuildBFormatHrtf(device->HrtfHandle,
|
||||
device->Hrtf, device->Dry.NumChannels, AmbiPoints, AmbiMatrix, COUNTOF(AmbiPoints),
|
||||
device->mHrtfState, device->Dry.NumChannels, AmbiPoints, AmbiMatrix, COUNTOF(AmbiPoints),
|
||||
AmbiOrderHFGain
|
||||
);
|
||||
|
||||
@@ -930,8 +930,8 @@ void aluInitRenderer(ALCdevice *device, ALint hrtf_id, enum HrtfRequestMode hrtf
|
||||
int bs2blevel;
|
||||
size_t i;
|
||||
|
||||
al_free(device->Hrtf);
|
||||
device->Hrtf = nullptr;
|
||||
al_free(device->mHrtfState);
|
||||
device->mHrtfState = nullptr;
|
||||
device->HrtfHandle = nullptr;
|
||||
device->HrtfName.clear();
|
||||
device->Render_Mode = NormalRender;
|
||||
|
||||
@@ -666,9 +666,9 @@ struct ALCdevice_struct {
|
||||
POSTPROCESS PostProcess{};
|
||||
|
||||
/* HRTF state and info */
|
||||
struct DirectHrtfState *Hrtf{nullptr};
|
||||
DirectHrtfState *mHrtfState{nullptr};
|
||||
std::string HrtfName;
|
||||
struct Hrtf *HrtfHandle{nullptr};
|
||||
Hrtf *HrtfHandle{nullptr};
|
||||
al::vector<EnumeratedHrtf> HrtfList;
|
||||
ALCenum HrtfStatus{ALC_FALSE};
|
||||
|
||||
@@ -739,7 +739,7 @@ struct ALCdevice_struct {
|
||||
ATOMIC(ALCcontext*) ContextList{nullptr};
|
||||
|
||||
almtx_t BackendLock;
|
||||
struct ALCbackend *Backend{nullptr};
|
||||
ALCbackend *Backend{nullptr};
|
||||
|
||||
ATOMIC(ALCdevice*) next{nullptr};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user