dom/media: add S16 support code to audio decoders

This commit is contained in:
roytam1 2023-08-26 07:37:26 +08:00
commit 28f55eb5c4
2 changed files with 49 additions and 0 deletions

View file

@ -312,7 +312,11 @@ WMFAudioMFTManager::Output(int64_t aStreamOffset,
int16_t* pcm = (int16_t*)data;
for (int32_t i = 0; i < numSamples; ++i) {
#ifdef MOZ_SAMPLE_TYPE_FLOAT32
audioData[i] = AudioSampleToFloat(pcm[i]);
#else
audioData[i] = pcm[i];
#endif
}
buffer->Unlock();