forked from teamnwah/openmw-tes3coop
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
1 changed files with 4 additions and 4 deletions
|
@ -204,8 +204,8 @@ void OpenAL_SoundStream::play()
|
||||||
for(ALuint i = 0;i < sNumBuffers;i++)
|
for(ALuint i = 0;i < sNumBuffers;i++)
|
||||||
{
|
{
|
||||||
size_t got;
|
size_t got;
|
||||||
got = mDecoder->read(&data[0], data.size());
|
got = mDecoder->read(data.data(), data.size());
|
||||||
alBufferData(mBuffers[i], mFormat, &data[0], got, mSampleRate);
|
alBufferData(mBuffers[i], mFormat, data.data(), got, mSampleRate);
|
||||||
}
|
}
|
||||||
throwALerror();
|
throwALerror();
|
||||||
|
|
||||||
|
@ -270,11 +270,11 @@ bool OpenAL_SoundStream::process()
|
||||||
if(mIsFinished)
|
if(mIsFinished)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
got = mDecoder->read(&data[0], data.size());
|
got = mDecoder->read(data.data(), data.size());
|
||||||
mIsFinished = (got < data.size());
|
mIsFinished = (got < data.size());
|
||||||
if(got > 0)
|
if(got > 0)
|
||||||
{
|
{
|
||||||
alBufferData(bufid, mFormat, &data[0], got, mSampleRate);
|
alBufferData(bufid, mFormat, data.data(), got, mSampleRate);
|
||||||
alSourceQueueBuffers(mSource, 1, &bufid);
|
alSourceQueueBuffers(mSource, 1, &bufid);
|
||||||
}
|
}
|
||||||
} while(processed > 0);
|
} while(processed > 0);
|
||||||
|
|
Loading…
Reference in a new issue