VirtualBox

Changeset 70125 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Dec 14, 2017 11:02:53 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
119679
Message:

Audio/HDA: Use LVI + 1 foor the stream periods and stream transfer fragments (as LVI is zero-based, 2 entries minimum).

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

Legend:

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

    r70124 r70125  
    244244        /** @todo Use a more dynamic fragment size? */
    245245        Assert(pStream->u16LVI <= UINT8_MAX - 1);
    246         uint8_t cFragments = pStream->u16LVI;
     246        uint8_t cFragments = pStream->u16LVI + 1;
    247247        if (cFragments <= 1)
    248248            cFragments = 2; /* At least two fragments (BDLEs) must be present. */
  • trunk/src/VBox/Devices/Audio/HDAStreamPeriod.cpp

    r69723 r70125  
    101101     * 3584  bytes (CBL) / 4 (frame size) = 896 frames / 2 (LVI)  = 448 frames per period
    102102     */
    103     unsigned cTotalPeriods = u16LVI;
     103    unsigned cTotalPeriods = u16LVI + 1;
    104104
    105105    if (cTotalPeriods <= 1)
Note: See TracChangeset for help on using the changeset viewer.

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