VirtualBox

Changeset 92210 in vbox for trunk


Ignore:
Timestamp:
Nov 4, 2021 9:39:02 AM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: Renaming. bugref:10008

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

Legend:

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

    r92209 r92210  
    23482348    memcpy(&pBeacon->Props, pProps, sizeof(PDMAUDIOPCMPROPS));
    23492349
    2350     pBeacon->cbToProcess = PDMAudioPropsFramesToBytes(&pBeacon->Props, AUDIOTEST_BEACON_SIZE_FRAMES);
     2350    pBeacon->cbSize = PDMAudioPropsFramesToBytes(&pBeacon->Props, AUDIOTEST_BEACON_SIZE_FRAMES);
    23512351}
    23522352
     
    23802380uint32_t AudioTestBeaconGetSize(PCAUDIOTESTTONEBEACON pBeacon)
    23812381{
    2382     return pBeacon->cbToProcess;
     2382    return pBeacon->cbSize;
    23832383}
    23842384
     
    24022402uint32_t AudioTestBeaconGetRemaining(PCAUDIOTESTTONEBEACON pBeacon)
    24032403{
    2404     return pBeacon->cbToProcess - pBeacon->cbProcessed;
     2404    return pBeacon->cbSize - pBeacon->cbUsed;
    24052405}
    24062406
     
    24132413uint32_t AudioTestBeaconGetUsed(PCAUDIOTESTTONEBEACON pBeacon)
    24142414{
    2415     return pBeacon->cbProcessed;
     2415    return pBeacon->cbUsed;
    24162416}
    24172417
     
    24262426int AudioTestBeaconWrite(PAUDIOTESTTONEBEACON pBeacon, void *pvBuf, uint32_t cbBuf)
    24272427{
    2428     AssertReturn(pBeacon->cbProcessed + cbBuf <= pBeacon->cbToProcess, VERR_BUFFER_OVERFLOW);
     2428    AssertReturn(pBeacon->cbUsed + cbBuf <= pBeacon->cbSize, VERR_BUFFER_OVERFLOW);
    24292429
    24302430    memset(pvBuf, AudioTestBeaconByteFromType(pBeacon->enmType), cbBuf);
    24312431
    2432     pBeacon->cbProcessed += cbBuf;
     2432    pBeacon->cbUsed += cbBuf;
    24332433
    24342434    return VINF_SUCCESS;
     
    24832483
    24842484    unsigned const cbStep             = cbFrameSize;
    2485     uint32_t const cbProcessedInitial = pBeacon->cbProcessed;
     2485    uint32_t const cbProcessedInitial = pBeacon->cbUsed;
    24862486
    24872487    for (size_t i = 0; i < cbBuf; i += cbStep)
     
    24942494            if (offGap)
    24952495            {
    2496                 pBeacon->cbProcessed = 0;
     2496                pBeacon->cbUsed = 0;
    24972497            }
    2498             pBeacon->cbProcessed += cbStep;
     2498            pBeacon->cbUsed += cbStep;
    24992499            offGap = 0;
    25002500        }
     
    25032503    }
    25042504
    2505     Assert(pBeacon->cbProcessed >= cbProcessedInitial);
    2506     return pBeacon->cbProcessed - cbProcessedInitial;
     2505    Assert(pBeacon->cbUsed >= cbProcessedInitial);
     2506    return pBeacon->cbUsed - cbProcessedInitial;
    25072507}
    25082508
     
    25172517bool AudioTestBeaconIsComplete(PCAUDIOTESTTONEBEACON pBeacon)
    25182518{
    2519     AssertReturn(pBeacon->cbProcessed <= pBeacon->cbToProcess, true);
    2520     return (pBeacon->cbProcessed == pBeacon->cbToProcess);
     2519    AssertReturn(pBeacon->cbUsed <= pBeacon->cbSize, true);
     2520    return (pBeacon->cbUsed == pBeacon->cbSize);
    25212521}
    25222522
  • trunk/src/VBox/Devices/Audio/AudioTest.h

    r92195 r92210  
    154154     *  When doing test tone playback: Beacon bytes to write.
    155155     *  When doing test tone recording: Beacon bytes to read. */
    156     uint32_t                cbToProcess;
     156    uint32_t                cbSize;
    157157    /** Beacon bytes already processed.
    158158     *  When doing test tone playback: Beacon bytes written.
    159159     *  When doing test tone recording: Beacon bytes read. */
    160     uint32_t                cbProcessed;
     160    uint32_t                cbUsed;
    161161} AUDIOTESTTONEBEACON;
    162162/** Pointer to audio test tone beacon. */
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