VirtualBox

Changeset 82463 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Dec 6, 2019 2:29:16 PM (5 years ago)
Author:
vboxsync
Message:

pdmaudioifs.h,Devices/Audio: Corrected the size alignment of PDMAUDIOSTREAMCFG to 8 bytes. bugref:9218

Location:
trunk/src/VBox/Devices/Audio
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r82451 r82463  
    360360#endif
    361361    /** The stream's current configuration. */
    362     PDMAUDIOSTREAMCFG       Cfg; //+104
    363     uint32_t                Padding2;
     362    PDMAUDIOSTREAMCFG       Cfg; //+108
    364363#ifdef VBOX_WITH_AUDIO_AC97_ASYNC_IO
    365364    /** Asynchronous I/O state members. */
  • trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp

    r82458 r82463  
    951951    AssertPtrReturnVoid(pCfg);
    952952
    953     RT_BZERO(pCfg, sizeof(PDMAUDIOSTREAMCFG));
     953    RT_ZERO(*pCfg);
    954954
    955955    pCfg->Backend.cFramesPreBuffering = UINT32_MAX; /* Explicitly set to "undefined". */
  • trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp

    r82255 r82463  
    114114{
    115115    /** The stream's acquired configuration. */
    116     PDMAUDIOSTREAMCFG  Cfg;
     116    PDMAUDIOSTREAMCFG   Cfg;
    117117    /** Buffer alignment. */
    118     uint8_t            uAlign;
     118    uint8_t             uAlign;
    119119    /** Whether this stream is in an enable state on the DirectSound side. */
    120     bool               fEnabled;
     120    bool                fEnabled;
     121    bool                afPadding[2];
     122    /** Size (in bytes) of the DirectSound buffer.
     123     *  @note This in *not* the size of the circular buffer above! */
     124    DWORD               cbBufSize;
    121125    /** The stream's critical section for synchronizing access. */
    122     RTCRITSECT         CritSect;
     126    RTCRITSECT          CritSect;
    123127    /** The internal playback / capturing buffer. */
    124     PRTCIRCBUF         pCircBuf;
    125     /** Size (in bytes) of the DirectSound buffer.
    126      *  Note: This in *not* the size of the circular buffer above! */
    127     DWORD              cbBufSize;
     128    PRTCIRCBUF          pCircBuf;
    128129    union
    129130    {
  • trunk/src/VBox/Devices/Audio/HDAStream.h

    r82450 r82463  
    166166     *  Should match SDFMT. */
    167167    PDMAUDIOSTREAMCFG       Cfg;
    168     uint32_t                Padding4;
    169168    /** Timestamp (in ns) of last stream update. */
    170169    uint64_t                tsLastUpdateNs;
  • trunk/src/VBox/Devices/Audio/HDAStreamMap.cpp

    r82252 r82463  
    156156        PPDMAUDIOSTREAMMAP pMapLR = &pMap->paMappings[0];
    157157
    158         pMapLR->aID[0]   = PDMAUDIOSTREAMCHANNELID_FRONT_LEFT;
    159         pMapLR->aID[1]   = PDMAUDIOSTREAMCHANNELID_FRONT_RIGHT;
    160         pMapLR->cbFrame  = pProps->cbSample * pProps->cChannels;
    161         pMapLR->cbStep   = pProps->cbSample * 2 /* Front left + Front right channels */;
    162         pMapLR->offFirst = 0;
    163         pMapLR->offNext  = pMapLR->offFirst;
     158        pMapLR->aenmIDs[0]  = PDMAUDIOSTREAMCHANNELID_FRONT_LEFT;
     159        pMapLR->aenmIDs[1]  = PDMAUDIOSTREAMCHANNELID_FRONT_RIGHT;
     160        pMapLR->cbFrame     = pProps->cbSample * pProps->cChannels;
     161        pMapLR->cbStep      = pProps->cbSample * 2 /* Front left + Front right channels */;
     162        pMapLR->offFirst    = 0;
     163        pMapLR->offNext     = pMapLR->offFirst;
    164164
    165165        rc = hdaR3StreamChannelDataInit(&pMapLR->Data, PDMAUDIOSTREAMCHANNELDATA_FLAGS_NONE);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette