diff options
author | Chris Robinson <[email protected]> | 2021-01-24 09:29:56 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-01-24 09:29:56 -0800 |
commit | f7acc30c22447565a0ab0fb1d5f553fe060217fb (patch) | |
tree | fddbf7b72b1a8c0251570543e368b1533ab65ea0 /al | |
parent | 13c1d7efb7141aee93d32a60c0e609e61a64f550 (diff) |
Store the callback in the buffer list item
Diffstat (limited to 'al')
-rw-r--r-- | al/source.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/al/source.cpp b/al/source.cpp index ecaf4069..2005d25e 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -447,6 +447,7 @@ void InitVoice(Voice *voice, ALsource *source, BufferlistItem *BufferList, ALCco ALuint num_channels{buffer->channelsFromFmt()}; voice->mFrequency = buffer->mSampleRate; voice->mFmtChannels = buffer->mChannels; + voice->mFmtType = buffer->mType; voice->mSampleSize = buffer->bytesFromFmt(); voice->mAmbiLayout = buffer->mAmbiLayout; voice->mAmbiScaling = buffer->mAmbiScaling; @@ -1397,6 +1398,8 @@ bool SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp prop, const a /* Add the selected buffer to a one-item queue */ auto newlist = new BufferlistItem{}; + newlist->mCallback = buffer->mCallback; + newlist->mUserData = buffer->mUserData; newlist->mSampleLen = buffer->mSampleLen; newlist->mLoopStart = buffer->mLoopStart; newlist->mLoopEnd = buffer->mLoopEnd; @@ -3302,7 +3305,6 @@ START_API_FUNC } if(!buffer) continue; BufferList->mSampleLen = buffer->mSampleLen; - BufferList->mLoopStart = 0; BufferList->mLoopEnd = buffer->mSampleLen; BufferList->mSamples = buffer->mData; BufferList->mBuffer = buffer; |