VirtualBox

Changeset 89405 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
May 31, 2021 1:58:57 PM (4 years ago)
Author:
vboxsync
Message:

AudioMixBuffer: Fix buggy generic decoders. bugref:9890

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/AudioMixBuffer-Convert.cpp.h

    r89400 r89405  
    139139            int8_t idxSrc = pState->aidxChannelMap[idxDst];
    140140            if (idxSrc >= 0)
    141                 pi32Dst[idxDst] = RT_CONCAT(audioMixBufSampleTo,a_Name)(pSrc[idxSrc]);
     141                pi32Dst[idxDst] = RT_CONCAT(audioMixBufSampleFrom,a_Name)(pSrc[idxSrc]);
    142142            else if (idxSrc != -2)
    143143                pi32Dst[idxDst] = (a_fSigned) ? 0 : (a_Max >> 1);
     
    227227            int8_t idxSrc = pState->aidxChannelMap[idxDst];
    228228            if (idxSrc >= 0)
    229                 audioMixBufBlendSample(&pi32Dst[idxDst], RT_CONCAT(audioMixBufSampleTo,a_Name)(pSrc[idxSrc]));
     229                audioMixBufBlendSample(&pi32Dst[idxDst], RT_CONCAT(audioMixBufSampleFrom,a_Name)(pSrc[idxSrc]));
    230230        }
    231231        pi32Dst += cDstChannels;
  • trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp

    r89400 r89405  
    15631563            pState->pfnEncode((uint8_t *)pvDst + cSrcFrames1 * pState->cbDstFrame,
    15641564                              &pMixBuf->pi32Samples[0], cMaxSrcFrames - cSrcFrames1, pState);
     1565
     1566        //Log9Func(("*pcbDstPeeked=%#x\n%32.*Rhxd\n", *pcbDstPeeked, *pcbDstPeeked, pvDst));
    15651567    }
    15661568    else
     
    16591661        *pcDstFramesWritten = cMaxDstFrames;
    16601662
     1663        //Log10Func(("cbSrc=%#x\n%32.*Rhxd\n", pState->cbSrcFrame * cMaxDstFrames, pState->cbSrcFrame * cMaxDstFrames, pvSrcBuf));
     1664
    16611665        /* First chunk. */
    16621666        uint32_t const cDstFrames1 = RT_MIN(pMixBuf->cFrames - offDstFrame, cMaxDstFrames);
    16631667        pState->pfnDecode(&pMixBuf->pi32Samples[offDstFrame * pMixBuf->cChannels], pvSrcBuf, cDstFrames1, pState);
     1668        //Log8Func(("offDstFrame=%#x cDstFrames1=%#x\n%32.*Rhxd\n", offDstFrame, cDstFrames1,
     1669        //          cDstFrames1 * pMixBuf->cbFrame, &pMixBuf->pi32Samples[offDstFrame * pMixBuf->cChannels]));
    16641670
    16651671        /* Another chunk from the start of the mixing buffer? */
    16661672        if (cMaxDstFrames > cDstFrames1)
     1673        {
    16671674            pState->pfnDecode(&pMixBuf->pi32Samples[0], (uint8_t *)pvSrcBuf + cDstFrames1 * pState->cbSrcFrame,
    16681675                              cMaxDstFrames - cDstFrames1, pState);
     1676            //Log8Func(("cDstFrames2=%#x\n%32.*Rhxd\n", cMaxDstFrames - cDstFrames1,
     1677            //          (cMaxDstFrames - cDstFrames1) * pMixBuf->cbFrame, &pMixBuf->pi32Samples[0]));
     1678        }
    16691679    }
    16701680    else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette