Changeset 88016 in vbox for trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
- Timestamp:
- Mar 8, 2021 1:14:14 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
r88015 r88016 786 786 787 787 if (fValid) 788 fValid = DrvAudioHlpP CMPropsAreValid(&pCfg->Props);788 fValid = DrvAudioHlpPcmPropsAreValid(&pCfg->Props); 789 789 790 790 return fValid; … … 1342 1342 1343 1343 /** 1344 * C hecks whether two given PCM properties are equal.1345 * 1346 * @returns @c true if equal, @c false if not.1347 * @param pProps1 Firstproperties to compare.1348 * @param pProps2 Secondproperties 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. 1349 1349 */ 1350 1350 bool DrvAudioHlpPcmPropsAreEqual(PCPDMAUDIOPCMPROPS pProps1, PCPDMAUDIOPCMPROPS pProps2) … … 1356 1356 return true; 1357 1357 1358 return 1359 1360 1361 1362 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; 1363 1363 } 1364 1364 … … 1366 1366 * Checks whether given PCM properties are valid or not. 1367 1367 * 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 */ 1377 bool DrvAudioHlpPcmPropsAreValid(PCPDMAUDIOPCMPROPS pProps) 1372 1378 { 1373 1379 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.) */ 1374 1384 1375 1385 /* Minimum 1 channel (mono), maximum 7.1 (= 8) channels. */
Note:
See TracChangeset
for help on using the changeset viewer.