diff options
author | Chris Robinson <[email protected]> | 2023-02-12 04:35:09 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-02-12 04:35:09 -0800 |
commit | ac28273166eb1ba8608a90ccaa10b62d2251f5a3 (patch) | |
tree | 7299a954f08b71f4d112fc77c410c5c56ed31162 /core | |
parent | 68e8f2fffbacf06a63c3f0c7a7d81fe70dbbb5a0 (diff) |
Use to_address to pass a pointer-like iterator as a real pointer
Diffstat (limited to 'core')
-rw-r--r-- | core/voice.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/voice.cpp b/core/voice.cpp index fc5c864e..a927f36b 100644 --- a/core/voice.cpp +++ b/core/voice.cpp @@ -650,7 +650,7 @@ void Voice::mix(const State vstate, ContextBase *Context, const nanoseconds devi if(mFlags.test(VoiceIsStatic)) LoadBufferStatic(BufferListItem, BufferLoopItem, uintPos, mFmtType, chan, - mFrameStep, srcSampleDelay, srcBufferSize, resampleBuffer); + mFrameStep, srcSampleDelay, srcBufferSize, al::to_address(resampleBuffer)); else if(mFlags.test(VoiceIsCallback)) { const size_t bufferOffset{uintPos - callbackBase}; @@ -673,14 +673,15 @@ void Voice::mix(const State vstate, ContextBase *Context, const nanoseconds devi mNumCallbackSamples = static_cast<uint>(getTotal); } LoadBufferCallback(BufferListItem, bufferOffset, mNumCallbackSamples, - mFmtType, chan, mFrameStep, srcSampleDelay, srcBufferSize, resampleBuffer); + mFmtType, chan, mFrameStep, srcSampleDelay, srcBufferSize, + al::to_address(resampleBuffer)); } else LoadBufferQueue(BufferListItem, BufferLoopItem, uintPos, mFmtType, chan, - mFrameStep, srcSampleDelay, srcBufferSize, resampleBuffer); + mFrameStep, srcSampleDelay, srcBufferSize, al::to_address(resampleBuffer)); } - Resample(&mResampleState, resampleBuffer, fracPos, increment, + Resample(&mResampleState, al::to_address(resampleBuffer), fracPos, increment, {MixingSamples[chan]+samplesLoaded, dstBufferSize}); /* Store the last source samples used for next time. */ |