mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-22 08:27:31 +09:00
dom/media: add S16 support code to audio decoders
This commit is contained in:
parent
edeec38e07
commit
28f55eb5c4
2 changed files with 49 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue