Changeset 99559 in vbox
- Timestamp:
- Apr 28, 2023 2:30:50 PM (19 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudioinline.h
r98103 r99559 407 407 DECLINLINE(void) PDMAudioPropsInit(PPDMAUDIOPCMPROPS pProps, uint8_t cbSample, bool fSigned, uint8_t cChannels, uint32_t uHz) 408 408 { 409 Assert(cChannels <= PDMAUDIO_MAX_CHANNELS); 410 409 411 pProps->cbFrame = cbSample * cChannels; 410 412 pProps->cbSampleX = cbSample; … … 429 431 bool fLittleEndian, bool fRaw) 430 432 { 433 Assert(cChannels <= PDMAUDIO_MAX_CHANNELS); 431 434 Assert(!fRaw || cbSample == sizeof(int64_t)); 432 435 pProps->cbFrame = cbSample * cChannels; … … 503 506 DECL_FORCE_INLINE(uint8_t) PDMAudioPropsChannels(PCPDMAUDIOPCMPROPS pProps) 504 507 { 508 AssertReturn(pProps->cChannelsX <= PDMAUDIO_MAX_CHANNELS, PDMAUDIO_MAX_CHANNELS); 505 509 return pProps->cChannelsX; 506 510 } -
trunk/src/VBox/Devices/Audio/AudioTest.cpp
r98103 r99559 3276 3276 uBuf.Wave.u.FmtExt.Data.fChannelMask, 3277 3277 audioTestWaveCountBits(uBuf.Wave.u.FmtExt.Data.fChannelMask), uBuf.Wave.u.Fmt.Data.cChannels); 3278 else if (uBuf.Wave.u.Fmt.Data.cChannels > PDMAUDIO_MAX_CHANNELS) 3279 RTErrInfoSetF(pErrInfo, rc, "More than %u channels are not supported (%u given)", 3280 PDMAUDIO_MAX_CHANNELS, uBuf.Wave.u.Fmt.Data.cChannels); 3278 3281 else if ( uBuf.Wave.u.Fmt.Data.uFormatTag == RTRIFFWAVEFMT_TAG_EXTENSIBLE 3279 3282 && RTUuidCompareStr(&uBuf.Wave.u.FmtExt.Data.SubFormat, RTRIFFWAVEFMTEXT_SUBTYPE_PCM) != 0) … … 3297 3300 - (unsigned)PDMAUDIOCHANNELID_FIRST_STANDARD; 3298 3301 unsigned iCh = 0; 3299 for (unsigned idCh = 0; idCh < 32&& iCh < uBuf.Wave.u.Fmt.Data.cChannels; idCh++)3302 for (unsigned idCh = 0; idCh < PDMAUDIO_MAX_CHANNELS && iCh < uBuf.Wave.u.Fmt.Data.cChannels; idCh++) 3300 3303 if (uBuf.Wave.u.FmtExt.Data.fChannelMask & RT_BIT_32(idCh)) 3301 3304 {
Note:
See TracChangeset
for help on using the changeset viewer.