Changeset 89447 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jun 1, 2021 11:34:39 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioHlp.cpp
r89379 r89447 200 200 AssertReturn(PDMAudioPropsAreValid(pProps), false); 201 201 202 /* Minimum 1 channel (mono), maximum 7.1 (= 8) channels. */ 203 if (PDMAudioPropsChannels(pProps) >= 1 && PDMAudioPropsChannels(pProps) <= 8) 204 { 205 switch (PDMAudioPropsSampleSize(pProps)) 206 { 207 case 1: /* 8 bit */ 208 if (PDMAudioPropsIsSigned(pProps)) 209 return false; 210 break; 211 case 2: /* 16 bit */ 212 if (!PDMAudioPropsIsSigned(pProps)) 213 return false; 214 break; 215 /** @todo Do we need support for 24 bit samples? */ 216 case 4: /* 32 bit */ 217 if (!PDMAudioPropsIsSigned(pProps)) 218 return false; 219 break; 220 case 8: /* 64-bit raw */ 221 if ( !PDMAudioPropsIsSigned(pProps) 222 || !pProps->fRaw) 223 return false; 224 break; 225 default: 202 switch (PDMAudioPropsSampleSize(pProps)) 203 { 204 case 1: /* 8 bit */ 205 if (PDMAudioPropsIsSigned(pProps)) 206 return false; 207 break; 208 case 2: /* 16 bit */ 209 if (!PDMAudioPropsIsSigned(pProps)) 226 210 return false; 227 } 228 229 if (pProps->uHz > 0) 230 { 231 if (!pProps->fSwapEndian) /** @todo Handling Big Endian audio data is not supported yet. */ 232 return true; 233 } 234 } 211 break; 212 /** @todo Do we need support for 24 bit samples? */ 213 case 4: /* 32 bit */ 214 if (!PDMAudioPropsIsSigned(pProps)) 215 return false; 216 break; 217 case 8: /* 64-bit raw */ 218 if ( !PDMAudioPropsIsSigned(pProps) 219 || !pProps->fRaw) 220 return false; 221 break; 222 default: 223 return false; 224 } 225 226 if (!pProps->fSwapEndian) /** @todo Handling Big Endian audio data is not supported yet. */ 227 return true; 235 228 return false; 236 229 }
Note:
See TracChangeset
for help on using the changeset viewer.