VirtualBox

Changeset 89506 in vbox


Ignore:
Timestamp:
Jun 4, 2021 12:11:56 PM (3 years ago)
Author:
vboxsync
Message:

pdmaudioinline.h/PDMAudioPropsAreEqual: Compare channel IDs too. bugref:9890

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmaudioinline.h

    r89446 r89506  
    10121012DECLINLINE(bool) PDMAudioPropsAreEqual(PCPDMAUDIOPCMPROPS pProps1, PCPDMAUDIOPCMPROPS pProps2)
    10131013{
     1014    uintptr_t idxCh;
    10141015    AssertPtrReturn(pProps1, false);
    10151016    AssertPtrReturn(pProps2, false);
     
    10181019        return true;
    10191020
    1020     return pProps1->uHz         == pProps2->uHz
    1021         && pProps1->cChannelsX  == pProps2->cChannelsX
    1022         && pProps1->cbSampleX   == pProps2->cbSampleX
    1023         && pProps1->fSigned     == pProps2->fSigned
    1024         && pProps1->fSwapEndian == pProps2->fSwapEndian;
     1021    if (pProps1->uHz != pProps2->uHz)
     1022        return false;
     1023    if (pProps1->cChannelsX  != pProps2->cChannelsX)
     1024        return false;
     1025    if (pProps1->cbSampleX   != pProps2->cbSampleX)
     1026        return false;
     1027    if (pProps1->fSigned     != pProps2->fSigned)
     1028        return false;
     1029    if (pProps1->fSwapEndian != pProps2->fSwapEndian)
     1030        return false;
     1031    if (pProps1->fRaw        != pProps2->fRaw)
     1032        return false;
     1033
     1034    idxCh = pProps1->cChannelsX;
     1035    while (idxCh-- > 0)
     1036        if (pProps1->aidChannels[idxCh] != pProps2->aidChannels[idxCh])
     1037            return false;
     1038
     1039    return true;
    10251040}
    10261041
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