VirtualBox

Changeset 67462 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 19, 2017 10:05:03 AM (8 years ago)
Author:
vboxsync
Message:

Audio/DevHDA: Renaming, logging.

File:
1 edited

Legend:

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

    r67442 r67462  
    54715471#endif
    54725472            /* How much (guest output) data is available at the moment? */
    5473             uint32_t cbToRead = hdaStreamGetUsed(pStream);
     5473            uint32_t cbAvailable = hdaStreamGetUsed(pStream);
    54745474
    54755475            /* Do not write more than the sink can hold at the moment.
    54765476             * The host sets the overall pace. */
    5477             if (cbToRead > cbWritable)
    5478                 cbToRead = cbWritable;
    5479 
    5480             if (cbToRead)
     5477            if (cbAvailable > cbWritable)
     5478                cbAvailable = cbWritable;
     5479
     5480            if (cbAvailable)
    54815481            {
    54825482                /* Read (guest output) data and write it to the stream's sink. */
    5483                 rc2 = hdaStreamRead(pThis, pStream, cbToRead, NULL /* pcbRead */);
     5483                rc2 = hdaStreamRead(pThis, pStream, cbAvailable, NULL /* pcbRead */);
    54845484                AssertRC(rc2);
    54855485            }
     
    55115511            const uint32_t cbReadable = AudioMixerSinkGetReadable(pSink);
    55125512
    5513             Log3Func(("[SD%RU8] cbReadable=%RU32\n", pStream->u8SD, cbReadable));
    5514 
    55155513            /* How much (guest input) data is free at the moment? */
    5516             uint32_t cbToWrite = hdaStreamGetFree(pStream);
     5514            uint32_t cbFree = hdaStreamGetFree(pStream);
     5515
     5516            Log3Func(("[SD%RU8] cbReadable=%RU32, cbFree=%RU32\n", pStream->u8SD, cbReadable, cbFree));
    55175517
    55185518            /* Do not read more than the sink can provide at the moment.
    55195519             * The host sets the overall pace. */
    5520             if (cbToWrite > cbReadable)
    5521                 cbToWrite = cbReadable;
    5522 
    5523             if (cbToWrite)
     5520            if (cbFree > cbReadable)
     5521                cbFree = cbReadable;
     5522
     5523            if (cbFree)
    55245524            {
    55255525                /* Write (guest input) data to the stream which was read from stream's sink before. */
    5526                 rc2 = hdaStreamWrite(pThis, pStream, cbToWrite, NULL /* pcbWritten */);
     5526                rc2 = hdaStreamWrite(pThis, pStream, cbFree, NULL /* pcbWritten */);
    55275527                AssertRC(rc2);
    55285528            }
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