aboutsummaryrefslogtreecommitdiffstats
path: root/alc/voice.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-04-24 08:28:13 -0700
committerChris Robinson <[email protected]>2021-04-24 08:28:13 -0700
commitb54bb388a3dbd92518beef4bda03df5854aad1a9 (patch)
tree8cde0be5ca02b61ae81bf0c3ccdd3a2439b1923a /alc/voice.cpp
parent519672c8e54585bc6d827dd3efed943e06b3e6cd (diff)
Create a base the ALCdevice and ALCcontext structs
A base that contains the API-agnostic data, with ALCdevice and ALCcontext being for AL-specific data.
Diffstat (limited to 'alc/voice.cpp')
-rw-r--r--alc/voice.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/alc/voice.cpp b/alc/voice.cpp
index afc22a9b..ba00f082 100644
--- a/alc/voice.cpp
+++ b/alc/voice.cpp
@@ -181,7 +181,7 @@ void aluInitMixer()
namespace {
-void SendSourceStoppedEvent(ALCcontext *context, uint id)
+void SendSourceStoppedEvent(ContextBase *context, uint id)
{
RingBuffer *ring{context->mAsyncEvents.get()};
auto evt_vec = ring->getWriteVector();
@@ -370,7 +370,7 @@ void LoadBufferQueue(VoiceBufferItem *buffer, VoiceBufferItem *bufferLoopItem,
void DoHrtfMix(const float *samples, const uint DstBufferSize, DirectParams &parms,
- const float TargetGain, const uint Counter, uint OutPos, ALCdevice *Device)
+ const float TargetGain, const uint Counter, uint OutPos, DeviceBase *Device)
{
const uint IrSize{Device->mIrSize};
auto &HrtfSamples = Device->HrtfSourceData;
@@ -446,7 +446,7 @@ void DoHrtfMix(const float *samples, const uint DstBufferSize, DirectParams &par
}
void DoNfcMix(const al::span<const float> samples, FloatBufferLine *OutBuffer, DirectParams &parms,
- const float *TargetGains, const uint Counter, const uint OutPos, ALCdevice *Device)
+ const float *TargetGains, const uint Counter, const uint OutPos, DeviceBase *Device)
{
using FilterProc = void (NfcFilter::*)(const al::span<const float>, float*);
static constexpr FilterProc NfcProcess[MaxAmbiOrder+1]{
@@ -474,7 +474,7 @@ void DoNfcMix(const al::span<const float> samples, FloatBufferLine *OutBuffer, D
} // namespace
-void Voice::mix(const State vstate, ALCcontext *Context, const uint SamplesToDo)
+void Voice::mix(const State vstate, ContextBase *Context, const uint SamplesToDo)
{
static constexpr std::array<float,MAX_OUTPUT_CHANNELS> SilentTarget{};
@@ -496,7 +496,7 @@ void Voice::mix(const State vstate, ALCcontext *Context, const uint SamplesToDo)
return;
}
- ALCdevice *Device{Context->mDevice.get()};
+ DeviceBase *Device{Context->mDevice};
const uint NumSends{Device->NumAuxSends};
ResamplerFunc Resample{(increment == MixerFracOne && DataPosFrac == 0) ?
@@ -819,7 +819,7 @@ void Voice::mix(const State vstate, ALCcontext *Context, const uint SamplesToDo)
}
}
-void Voice::prepare(ALCdevice *device)
+void Voice::prepare(DeviceBase *device)
{
if((mFmtChannels == FmtUHJ2 || mFmtChannels == FmtUHJ3 || mFmtChannels==FmtUHJ4) && !mDecoder)
mDecoder = std::make_unique<UhjDecoder>();