Changeset 87998 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Mar 8, 2021 1:20:54 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 143121
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
r87997 r87998 85 85 86 86 /** 87 * Retrieves the matching PDMAUDIOFMT for given bits + signing flag. 88 * 89 * @return IPRT status code. 90 * @return PDMAUDIOFMT Resulting audio format or PDMAUDIOFMT_INVALID if invalid. 91 * @param cBits Bits to retrieve audio format for. 92 * @param fSigned Signed flag for bits to retrieve audio format for. 93 */ 94 PDMAUDIOFMT DrvAudioAudFmtBitsToAudFmt(uint8_t cBits, bool fSigned) 87 * Retrieves the matching PDMAUDIOFMT for the given bits + signing flag. 88 * 89 * @return Matching PDMAUDIOFMT value. 90 * @retval PDMAUDIOFMT_INVALID if unsupported @a cBits value. 91 * 92 * @param cBits The number of bits in the audio format. 93 * @param fSigned Whether the audio format is signed @c true or not. 94 */ 95 PDMAUDIOFMT DrvAudioAudFmtBitsToFormat(uint8_t cBits, bool fSigned) 95 96 { 96 97 if (fSigned) … … 101 102 case 16: return PDMAUDIOFMT_S16; 102 103 case 32: return PDMAUDIOFMT_S32; 103 default: break;104 default: AssertMsgFailedReturn(("Bogus audio bits %RU8\n", cBits), PDMAUDIOFMT_INVALID); 104 105 } 105 106 } … … 111 112 case 16: return PDMAUDIOFMT_U16; 112 113 case 32: return PDMAUDIOFMT_U32; 113 default: break; 114 } 115 } 116 117 AssertMsgFailed(("Bogus audio bits %RU8\n", cBits)); 118 return PDMAUDIOFMT_INVALID; 114 default: AssertMsgFailedReturn(("Bogus audio bits %RU8\n", cBits), PDMAUDIOFMT_INVALID); 115 } 116 } 119 117 } 120 118 … … 789 787 if (!RTStrICmp(pszFmt, "u8")) 790 788 return PDMAUDIOFMT_U8; 791 elseif (!RTStrICmp(pszFmt, "u16"))789 if (!RTStrICmp(pszFmt, "u16")) 792 790 return PDMAUDIOFMT_U16; 793 elseif (!RTStrICmp(pszFmt, "u32"))791 if (!RTStrICmp(pszFmt, "u32")) 794 792 return PDMAUDIOFMT_U32; 795 elseif (!RTStrICmp(pszFmt, "s8"))793 if (!RTStrICmp(pszFmt, "s8")) 796 794 return PDMAUDIOFMT_S8; 797 elseif (!RTStrICmp(pszFmt, "s16"))795 if (!RTStrICmp(pszFmt, "s16")) 798 796 return PDMAUDIOFMT_S16; 799 elseif (!RTStrICmp(pszFmt, "s32"))797 if (!RTStrICmp(pszFmt, "s32")) 800 798 return PDMAUDIOFMT_S32; 801 799
Note:
See TracChangeset
for help on using the changeset viewer.