diff options
Diffstat (limited to 'core/voice.cpp')
-rw-r--r-- | core/voice.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/core/voice.cpp b/core/voice.cpp index b7e1c67d..f84c5555 100644 --- a/core/voice.cpp +++ b/core/voice.cpp @@ -48,7 +48,6 @@ struct SSETag; #ifdef HAVE_NEON struct NEONTag; #endif -struct CopyTag; static_assert(!(sizeof(DeviceBase::MixerBufferLine)&15), @@ -189,6 +188,11 @@ void SendSourceStoppedEvent(ContextBase *context, uint id) } +void CopyResample(const InterpState*, const float *RESTRICT src, uint, const uint, + const al::span<float> dst) +{ std::copy_n(src, dst.size(), dst.begin()); } + + const float *DoFilters(BiquadFilter &lpfilter, BiquadFilter &hpfilter, float *dst, const al::span<const float> src, int type) { @@ -562,7 +566,7 @@ void Voice::mix(const State vstate, ContextBase *Context, const nanoseconds devi MixingSamples.begin(), offset_bufferline); const ResamplerFunc Resample{(increment == MixerFracOne && DataPosFrac == 0) ? - Resample_<CopyTag,CTag> : mResampler}; + CopyResample : mResampler}; const uint PostPadding{MaxResamplerEdge + mDecoderPadding}; uint buffers_done{0u}; do { @@ -720,8 +724,9 @@ void Voice::mix(const State vstate, ContextBase *Context, const nanoseconds devi for(auto &chandata : mChans) { /* Resample, then apply ambisonic upsampling as needed. */ - float *ResampledData{Resample(&mResampleState, *voiceSamples, DataPosFrac, increment, - {Device->ResampledData, DstBufferSize})}; + float *ResampledData{Device->ResampledData}; + Resample(&mResampleState, *voiceSamples, DataPosFrac, increment, + {ResampledData, DstBufferSize}); ++voiceSamples; if(mFlags.test(VoiceIsAmbisonic)) |