VirtualBox

Ignore:
Timestamp:
Mar 8, 2021 1:14:14 PM (4 years ago)
Author:
vboxsync
Message:

Audio: DrvAudioHlpPCMPropsAreValid -> DrvAudioHlpPcmPropsAreValid; todos. bugref:9890

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp

    r88015 r88016  
    786786
    787787    if (fValid)
    788         fValid = DrvAudioHlpPCMPropsAreValid(&pCfg->Props);
     788        fValid = DrvAudioHlpPcmPropsAreValid(&pCfg->Props);
    789789
    790790    return fValid;
     
    13421342
    13431343/**
    1344  * Checks whether two given PCM properties are equal.
    1345  *
    1346  * @returns @c true if equal, @c false if not.
    1347  * @param   pProps1             First properties to compare.
    1348  * @param   pProps2             Second properties to compare.
     1344 * Compares two sets of PCM properties.
     1345 *
     1346 * @returns @c true if the same, @c false if not.
     1347 * @param   pProps1     The first set of properties to compare.
     1348 * @param   pProps2     The second set of properties to compare.
    13491349 */
    13501350bool DrvAudioHlpPcmPropsAreEqual(PCPDMAUDIOPCMPROPS pProps1, PCPDMAUDIOPCMPROPS pProps2)
     
    13561356        return true;
    13571357
    1358     return    pProps1->uHz         == pProps2->uHz
    1359            && pProps1->cChannels   == pProps2->cChannels
    1360            && pProps1->cbSample    == pProps2->cbSample
    1361            && pProps1->fSigned     == pProps2->fSigned
    1362            && pProps1->fSwapEndian == pProps2->fSwapEndian;
     1358    return pProps1->uHz         == pProps2->uHz
     1359        && pProps1->cChannels   == pProps2->cChannels
     1360        && pProps1->cbSample    == pProps2->cbSample
     1361        && pProps1->fSigned     == pProps2->fSigned
     1362        && pProps1->fSwapEndian == pProps2->fSwapEndian;
    13631363}
    13641364
     
    13661366 * Checks whether given PCM properties are valid or not.
    13671367 *
    1368  * Returns @c true if properties are valid, @c false if not.
    1369  * @param   pProps              PCM properties to check.
    1370  */
    1371 bool DrvAudioHlpPCMPropsAreValid(PCPDMAUDIOPCMPROPS pProps)
     1368 * @note  This is more of a supported than valid check.  There is code for
     1369 *        unsigned samples elsewhere (like DrvAudioHlpClearBuf()), but this
     1370 *        function will flag such properties as not valid.
     1371 *
     1372 * @todo  r=bird: See note and explain properly.
     1373 *
     1374 * @returns @c true if the properties are valid, @c false if not.
     1375 * @param   pProps      The PCM properties to check.
     1376 */
     1377bool DrvAudioHlpPcmPropsAreValid(PCPDMAUDIOPCMPROPS pProps)
    13721378{
    13731379    AssertPtrReturn(pProps, false);
     1380
     1381    /** @todo r=bird: This code is cannot make up its mind whether to return on
     1382     *        false, or whether to return at the end. (hint: just return
     1383     *        immediately, duh.) */
    13741384
    13751385    /* Minimum 1 channel (mono), maximum 7.1 (= 8) channels. */
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