зеркало из https://github.com/mozilla/gecko-dev.git
bug 1203380 add custom assignment operator to AudioBlock r=padenot
--HG-- extra : rebase_source : 620bcfe8e7841ab1b19790abbf4df87a3e083c35
This commit is contained in:
Родитель
99d66c32cb
Коммит
965591c713
|
@ -74,6 +74,12 @@ public:
|
|||
mBufferFormat = AUDIO_FORMAT_SILENCE;
|
||||
}
|
||||
|
||||
AudioBlock& operator=(const AudioBlock& aBlock) {
|
||||
// Instead of just copying, mBufferIsDownstreamRef must be first cleared
|
||||
// if set. It is set again for the new mBuffer if possible. This happens
|
||||
// in SetBuffer().
|
||||
return *this = aBlock.AsAudioChunk();
|
||||
}
|
||||
AudioBlock& operator=(const AudioChunk& aChunk) {
|
||||
MOZ_ASSERT(aChunk.mDuration == WEBAUDIO_BLOCK_SIZE);
|
||||
SetBuffer(aChunk.mBuffer);
|
||||
|
|
Загрузка…
Ссылка в новой задаче