Changeset 89480 in vbox for trunk/src/VBox
- Timestamp:
- Jun 3, 2021 12:40:59 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostAudioAlsa.cpp
r89473 r89480 508 508 unsigned int padding[1 + PDMAUDIO_MAX_CHANNELS]; 509 509 } u; 510 uint8_t aidChannels[PDMAUDIO_MAX_CHANNELS]; 511 unsigned int cChannels = u.Map.channels = PDMAudioPropsChannels(&pCfgReq->Props); 512 unsigned int iDst = 0; 510 uint8_t aidSrcChannels[PDMAUDIO_MAX_CHANNELS]; 511 unsigned int *aidDstChannels = &u.Map.pos[0]; 512 unsigned int cChannels = u.Map.channels = PDMAudioPropsChannels(&pCfgReq->Props); 513 unsigned int iDst = 0; 513 514 for (unsigned int iSrc = 0; iSrc < cChannels; iSrc++) 514 515 { 515 uint8_t const idSrc = pCfgReq->Props.aidChannels[iSrc];516 aid Channels[iDst] = idSrc;517 u.Map.pos[iDst]= drvHstAudAlsaPdmChToAlsa((PDMAUDIOCHANNELID)idSrc, cChannels);516 uint8_t const idSrc = pCfgReq->Props.aidChannels[iSrc]; 517 aidSrcChannels[iDst] = idSrc; 518 aidDstChannels[iDst] = drvHstAudAlsaPdmChToAlsa((PDMAUDIOCHANNELID)idSrc, cChannels); 518 519 iDst++; 519 520 } … … 521 522 for (; iDst < PDMAUDIO_MAX_CHANNELS; iDst++) 522 523 { 523 aid Channels[iDst] = PDMAUDIOCHANNELID_INVALID;524 u.Map.pos[iDst]= SND_CHMAP_NA;524 aidSrcChannels[iDst] = PDMAUDIOCHANNELID_INVALID; 525 aidDstChannels[iDst] = SND_CHMAP_NA; 525 526 } 526 527 … … 529 530 err); 530 531 if (cChannels == PDMAudioPropsChannels(&pCfgReq->Props)) 531 memcpy(pCfgAcq->Props.aidChannels, aid Channels, sizeof(pCfgAcq->Props.aidChannels));532 memcpy(pCfgAcq->Props.aidChannels, aidSrcChannels, sizeof(pCfgAcq->Props.aidChannels)); 532 533 else 533 534 {
Note:
See TracChangeset
for help on using the changeset viewer.