mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-19 16:21:08 +00:00
Use the vector's data field instead of the address of the first element
Same thing really, but less convoluted
This commit is contained in:
parent
fd8326e958
commit
0d973ac8ff
@ -204,8 +204,8 @@ void OpenAL_SoundStream::play()
|
||||
for(ALuint i = 0;i < sNumBuffers;i++)
|
||||
{
|
||||
size_t got;
|
||||
got = mDecoder->read(&data[0], data.size());
|
||||
alBufferData(mBuffers[i], mFormat, &data[0], got, mSampleRate);
|
||||
got = mDecoder->read(data.data(), data.size());
|
||||
alBufferData(mBuffers[i], mFormat, data.data(), got, mSampleRate);
|
||||
}
|
||||
throwALerror();
|
||||
|
||||
@ -270,11 +270,11 @@ bool OpenAL_SoundStream::process()
|
||||
if(mIsFinished)
|
||||
continue;
|
||||
|
||||
got = mDecoder->read(&data[0], data.size());
|
||||
got = mDecoder->read(data.data(), data.size());
|
||||
mIsFinished = (got < data.size());
|
||||
if(got > 0)
|
||||
{
|
||||
alBufferData(bufid, mFormat, &data[0], got, mSampleRate);
|
||||
alBufferData(bufid, mFormat, data.data(), got, mSampleRate);
|
||||
alSourceQueueBuffers(mSource, 1, &bufid);
|
||||
}
|
||||
} while(processed > 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user