VirtualBox

Ignore:
Timestamp:
Nov 15, 2021 6:56:32 PM (3 years ago)
Author:
vboxsync
Message:

Audio/Validation Kit: Added ability to also optionally enable the internal mixing engine when running self-tests (via --with-mixer"), use the same I/O options for self-test guest / host test environments for simplicity (see @todo). bugref:10008

File:
1 edited

Legend:

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

    r92051 r92439  
    6969    /** Common tag for guest and host side. */
    7070    char             szTag[AUDIOTEST_TAG_MAX];
    71     /** Whether to use DrvAudio in the driver stack or not. */
    72     bool             fWithDrvAudio;
     71    /** The driver stack in use. */
    7372    AUDIOTESTDRVSTACK DrvStack;
    7473    /** Audio driver to use.
     
    332331    { "--backend",          'b',                                RTGETOPT_REQ_STRING  },
    333332    { "--with-drv-audio",   'd',                                RTGETOPT_REQ_NOTHING },
     333    { "--with-mixer",       'm',                                RTGETOPT_REQ_NOTHING },
    334334    { "--exclude",          'e',                                RTGETOPT_REQ_UINT32  },
    335335    { "--include",          'i',                                RTGETOPT_REQ_UINT32  }
     
    346346        case 'e': return "Exclude the given test id from the list";
    347347        case 'i': return "Include the given test id in the list";
     348        case 'm': return "Use the internal mixing engine explicitly";
    348349        default:  return NULL;
    349350    }
     
    359360{
    360361    RT_ZERO(g_Ctx);
     362
     363    audioTestEnvInit(&g_Ctx.Guest.TstEnv);
     364    audioTestEnvInit(&g_Ctx.Host.TstEnv);
     365
     366    AUDIOTESTIOOPTS IoOpts;
     367    audioTestIoOptsInitDefaults(&IoOpts);
    361368
    362369    /* Argument processing loop: */
     
    379386
    380387            case 'd':
    381                 g_Ctx.fWithDrvAudio = true;
     388                IoOpts.fWithDrvAudio = true;
    382389                break;
    383390
     
    394401                break;
    395402
     403            case 'm':
     404                IoOpts.fWithMixer = true;
     405                break;
     406
    396407            AUDIO_TEST_COMMON_OPTION_CASES(ValueUnion);
    397408
     
    400411        }
    401412    }
     413
     414    /* For simplicity both test environments, guest and host, will have the same I/O options.
     415     ** @todo Make this indepedent by a prefix, "--[guest|host]-<option>" -> e.g. "--guest-with-drv-audio". */
     416    memcpy(&g_Ctx.Guest.TstEnv.IoOpts, &IoOpts, sizeof(AUDIOTESTIOOPTS));
     417    memcpy(&g_Ctx.Host.TstEnv.IoOpts,  &IoOpts, sizeof(AUDIOTESTIOOPTS));
    402418
    403419    rc = AudioTestDriverStackPerformSelftest();
     
    419435     */
    420436    rc = audioTestDriverStackInitEx(&g_Ctx.DrvStack, g_Ctx.pDrvReg,
    421                                     true /* fEnabledIn */, true /* fEnabledOut */, g_Ctx.fWithDrvAudio);
     437                                    true /* fEnabledIn */, true /* fEnabledOut */, g_Ctx.Host.TstEnv.IoOpts.fWithDrvAudio);
    422438    if (RT_FAILURE(rc))
    423439        return RTMsgErrorExit(RTEXITCODE_SYNTAX, "Unable to init driver stack: %Rrc\n", rc);
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