VirtualBox

Ignore:
Timestamp:
May 18, 2021 3:04:37 PM (4 years ago)
Author:
vboxsync
Message:

Audio/ValKit: Resolved some @todos. bugref:10008

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/audio/vkat.cpp

    r89141 r89143  
    19511951    PCPDMDRVREG pDrvReg       = g_aBackends[0].pDrvReg;
    19521952    bool        fWithDrvAudio = false;
     1953    uint8_t     cPcmSampleBit = 0;
     1954    uint8_t     cPcmChannels  = 0;
     1955    uint32_t    uPcmHz        = 0;
     1956    bool        fPcmSigned    = true;
    19531957
    19541958    int           rc;
     
    19931997
    19941998            case VKAT_TEST_OPT_COUNT:
    1995                 break;
     1999                return RTMsgErrorExitFailure("Not yet implemented!");
    19962000
    19972001            case VKAT_TEST_OPT_DEV:
     
    20002004
    20012005            case VKAT_TEST_OPT_PAUSE:
    2002                 break;
     2006                return RTMsgErrorExitFailure("Not yet implemented!");
    20032007
    20042008            case VKAT_TEST_OPT_OUTDIR:
     
    20092013
    20102014            case VKAT_TEST_OPT_PCM_BIT:
    2011                 /** @todo r=bird: the X suffix means: "fingers off!"   */
    2012                 TstCust.TestTone.Props.cbSampleX = ValueUnion.u8 / 8 /* bit */;
     2015                cPcmSampleBit = ValueUnion.u8;
    20132016                break;
    20142017
    20152018            case VKAT_TEST_OPT_PCM_CHAN:
    2016                 /** @todo r=bird: the X suffix means: "fingers off!"   */
    2017                 TstCust.TestTone.Props.cChannelsX = ValueUnion.u8;
     2019                cPcmChannels = ValueUnion.u8;
    20182020                break;
    20192021
    20202022            case VKAT_TEST_OPT_PCM_HZ:
    2021                 TstCust.TestTone.Props.uHz = ValueUnion.u32;
     2023                uPcmHz = ValueUnion.u32;
    20222024                break;
    20232025
    20242026            case VKAT_TEST_OPT_PCM_SIGNED:
    2025                 TstCust.TestTone.Props.fSigned = ValueUnion.f;
     2027                fPcmSigned = ValueUnion.f;
    20262028                break;
    20272029
     
    20512053     */
    20522054    RTTestBanner(g_hTest);
     2055
     2056    /* Initialize the custom test parameters with sensible defaults if nothing else is given. */
     2057    PDMAudioPropsInit(&TstCust.TestTone.Props,
     2058                      cPcmSampleBit ? cPcmSampleBit / 8 : 2 /* 16-bit */, fPcmSigned, cPcmChannels ? cPcmChannels : 2,
     2059                      uPcmHz ? uPcmHz : 44100);
    20532060
    20542061    /* For now all tests have the same test environment. */
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