VirtualBox

Changeset 107909 in vbox


Ignore:
Timestamp:
Jan 23, 2025 1:53:00 PM (2 weeks ago)
Author:
vboxsync
Message:

Audio/VKAT: Added optional parameter '--drvhost-cache-enabled <true|false>' to disable caching code for host backends which support this. Defaults to enabled (as before). bugref:10844

Location:
trunk/src/VBox/ValidationKit/utils/audio
Files:
3 edited

Legend:

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

    r106061 r107909  
    171171static const RTGETOPTDEF g_aCmdCommonOptions[] =
    172172{
    173     { "--quiet",            'q',                                        RTGETOPT_REQ_NOTHING },
    174     { "--verbose",          'v',                                        RTGETOPT_REQ_NOTHING },
    175     { "--daemonize",        AUDIO_TEST_OPT_CMN_DAEMONIZE,               RTGETOPT_REQ_NOTHING },
    176     { "--daemonized",       AUDIO_TEST_OPT_CMN_DAEMONIZED,              RTGETOPT_REQ_NOTHING },
    177     { "--debug-audio",      AUDIO_TEST_OPT_CMN_DEBUG_AUDIO_ENABLE,      RTGETOPT_REQ_NOTHING },
    178     { "--debug-audio-path", AUDIO_TEST_OPT_CMN_DEBUG_AUDIO_PATH,        RTGETOPT_REQ_STRING  },
     173    { "--quiet",                 'q',                                      RTGETOPT_REQ_NOTHING },
     174    { "--verbose",               'v',                                      RTGETOPT_REQ_NOTHING },
     175    { "--daemonize",             AUDIO_TEST_OPT_CMN_DAEMONIZE,             RTGETOPT_REQ_NOTHING },
     176    { "--daemonized",            AUDIO_TEST_OPT_CMN_DAEMONIZED,            RTGETOPT_REQ_NOTHING },
     177    { "--debug-audio",           AUDIO_TEST_OPT_CMN_DEBUG_AUDIO_ENABLE,    RTGETOPT_REQ_NOTHING },
     178    { "--debug-audio-path",      AUDIO_TEST_OPT_CMN_DEBUG_AUDIO_PATH,      RTGETOPT_REQ_STRING  },
     179    { "--drvhost-cache-enabled", AUDIO_TEST_OPT_CMN_DRVHOST_CACHE_ENABLED, RTGETOPT_REQ_BOOL    },
    179180};
    180181
     
    236237/** DrvAudio: The debug output path. */
    237238const char      *g_pszDrvAudioDebug = NULL;
    238 
     239/** Whether the host audio driver backend's caching is enabled or not. Defaults to enabled.
     240 *  Only implemented for DrvHostAudioWasApi backend so far, ignored otherwise. */
     241bool             g_fDrvHostAudioCacheEnabled = true;
    239242
    240243/**
     
    13131316                 "  --debug-audio-path=<path>\n"
    13141317                 "    Tells DrvAudio where to put its debug output (wav-files)\n"
     1318                 "  --drvhost-cache-enabled=<true|false>\n"
     1319                 "    Enables or disables caching code for the host driver (backend)\n"
    13151320                 "  -q, --quiet\n"
    13161321                 "    Sets verbosity to zero\n"
  • trunk/src/VBox/ValidationKit/utils/audio/vkatDriverStack.cpp

    r107877 r107909  
    159159            && strcmp(pszName, "DebugEnabled") == 0)
    160160            *pf = g_fDrvAudioDebug;
     161        else if (strcmp(pszName, "CacheEnabled") == 0)
     162            *pf = g_fDrvHostAudioCacheEnabled;
    161163
    162164        if (g_uVerbosity > 2)
  • trunk/src/VBox/ValidationKit/utils/audio/vkatInternal.h

    r106061 r107909  
    386386/** DrvAudio: The debug output path. */
    387387extern const char      *g_pszDrvAudioDebug;
     388/** Whether the host audio driver backend's caching is enabled or not. Defaults to enabled.
     389 *  Only implemented for DrvHostAudioWasApi backend so far, ignored otherwise. */
     390extern bool             g_fDrvHostAudioCacheEnabled;
    388391
    389392extern const VKATCMD    g_CmdTest;
     
    520523    AUDIO_TEST_OPT_CMN_DAEMONIZED,
    521524    AUDIO_TEST_OPT_CMN_DEBUG_AUDIO_ENABLE,
    522     AUDIO_TEST_OPT_CMN_DEBUG_AUDIO_PATH
     525    AUDIO_TEST_OPT_CMN_DEBUG_AUDIO_PATH,
     526    AUDIO_TEST_OPT_CMN_DRVHOST_CACHE_ENABLED
    523527};
    524528
     
    545549                break; \
    546550            \
     551            case AUDIO_TEST_OPT_CMN_DRVHOST_CACHE_ENABLED: \
     552                g_fDrvHostAudioCacheEnabled = a_ValueUnion.f; \
     553                break; \
     554            \
    547555            case AUDIO_TEST_OPT_CMN_DEBUG_AUDIO_PATH: \
    548                 g_pszDrvAudioDebug = (a_ValueUnion).psz; \
     556                g_pszDrvAudioDebug = a_ValueUnion.psz; \
    549557                break; \
    550558            case AUDIO_TEST_OPT_CMN_DAEMONIZE: \
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