VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/utils/audio/vkatInternal.h@ 107909

最後變更 在這個檔案從107909是 107909,由 vboxsync 提交於 2 月 前

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

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 22.1 KB
 
1/* $Id: vkatInternal.h 107909 2025-01-23 13:53:00Z vboxsync $ */
2/** @file
3 * VKAT - Internal header file for common definitions + structs.
4 */
5
6/*
7 * Copyright (C) 2021-2024 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.alldomusa.eu.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * The contents of this file may alternatively be used under the terms
26 * of the Common Development and Distribution License Version 1.0
27 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
28 * in the VirtualBox distribution, in which case the provisions of the
29 * CDDL are applicable instead of those of the GPL.
30 *
31 * You may elect to license modified versions of this file under the
32 * terms and conditions of either the GPL or the CDDL or both.
33 *
34 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
35 */
36
37#ifndef VBOX_INCLUDED_SRC_audio_vkatInternal_h
38#define VBOX_INCLUDED_SRC_audio_vkatInternal_h
39#ifndef RT_WITHOUT_PRAGMA_ONCE
40# pragma once
41#endif
42
43
44/*********************************************************************************************************************************
45* Header Files *
46*********************************************************************************************************************************/
47#include <iprt/getopt.h>
48
49#include <VBox/vmm/pdmdrv.h>
50#include <VBox/vmm/pdmaudioinline.h>
51#include <VBox/vmm/pdmaudiohostenuminline.h>
52
53#include "Audio/AudioMixBuffer.h"
54#include "Audio/AudioTest.h"
55#include "Audio/AudioTestService.h"
56#include "Audio/AudioTestServiceClient.h"
57
58#include "VBoxDD.h"
59
60
61/*********************************************************************************************************************************
62* Common defines *
63*********************************************************************************************************************************/
64/** Default (failsafe) timeout (in ms). */
65#define AUDIOTEST_TIMEOUT_DEFAULT_MS RT_MS_5MIN
66
67
68/*********************************************************************************************************************************
69* Structures and Typedefs *
70*********************************************************************************************************************************/
71/**
72 * Audio driver stack.
73 *
74 * This can be just be backend driver alone or DrvAudio with a backend.
75 * @todo add automatic resampling via mixer so we can test more of the audio
76 * stack used by the device emulations.
77 */
78typedef struct AUDIOTESTDRVSTACK
79{
80 /** The device registration record for the backend. */
81 PCPDMDRVREG pDrvReg;
82 /** The backend driver instance. */
83 PPDMDRVINS pDrvBackendIns;
84 /** The backend's audio interface. */
85 PPDMIHOSTAUDIO pIHostAudio;
86
87 /** The DrvAudio instance. */
88 PPDMDRVINS pDrvAudioIns;
89 /** This is NULL if we don't use DrvAudio. */
90 PPDMIAUDIOCONNECTOR pIAudioConnector;
91
92 /** The current (last) audio device enumeration to use. */
93 PDMAUDIOHOSTENUM DevEnum;
94} AUDIOTESTDRVSTACK;
95/** Pointer to an audio driver stack. */
96typedef AUDIOTESTDRVSTACK *PAUDIOTESTDRVSTACK;
97
98/**
99 * Backend-only stream structure.
100 */
101typedef struct AUDIOTESTDRVSTACKSTREAM
102{
103 /** The public stream data. */
104 PDMAUDIOSTREAM Core;
105 /** The backend data (variable size). */
106 PDMAUDIOBACKENDSTREAM Backend;
107} AUDIOTESTDRVSTACKSTREAM;
108/** Pointer to a backend-only stream structure. */
109typedef AUDIOTESTDRVSTACKSTREAM *PAUDIOTESTDRVSTACKSTREAM;
110
111/**
112 * Mixer setup for a stream.
113 */
114typedef struct AUDIOTESTDRVMIXSTREAM
115{
116 /** Pointer to the driver stack. */
117 PAUDIOTESTDRVSTACK pDrvStack;
118 /** Pointer to the stream. */
119 PPDMAUDIOSTREAM pStream;
120 /** Properties to use. */
121 PCPDMAUDIOPCMPROPS pProps;
122 /** Set if we're mixing or just passing thru to the driver stack. */
123 bool fDoMixing;
124 /** Mixer buffer. */
125 AUDIOMIXBUF MixBuf;
126 /** Write state. */
127 AUDIOMIXBUFWRITESTATE WriteState;
128 /** Peek state. */
129 AUDIOMIXBUFPEEKSTATE PeekState;
130} AUDIOTESTDRVMIXSTREAM;
131/** Pointer to mixer setup for a stream. */
132typedef AUDIOTESTDRVMIXSTREAM *PAUDIOTESTDRVMIXSTREAM;
133
134/**
135 * Enumeration specifying the current audio test mode.
136 */
137typedef enum AUDIOTESTMODE
138{
139 /** Unknown mode. */
140 AUDIOTESTMODE_UNKNOWN = 0,
141 /** VKAT is running on the guest side. */
142 AUDIOTESTMODE_GUEST,
143 /** VKAT is running on the host side. */
144 AUDIOTESTMODE_HOST
145} AUDIOTESTMODE;
146
147struct AUDIOTESTENV;
148/** Pointer a audio test environment. */
149typedef AUDIOTESTENV *PAUDIOTESTENV;
150
151struct AUDIOTESTDESC;
152/** Pointer a audio test descriptor. */
153typedef AUDIOTESTDESC *PAUDIOTESTDESC;
154
155/**
156 * Callback to set up the test parameters for a specific test.
157 *
158 * @returns IPRT status code.
159 * @retval VINF_SUCCESS if setting the parameters up succeeded. Any other error code
160 * otherwise indicating the kind of error.
161 * @param pszTest Test name.
162 * @param pTstParmsAcq The audio test parameters to set up.
163 */
164typedef DECLCALLBACKTYPE(int, FNAUDIOTESTSETUP,(PAUDIOTESTENV pTstEnv, PAUDIOTESTDESC pTstDesc, PAUDIOTESTPARMS pTstParmsAcq, void **ppvCtx));
165/** Pointer to an audio test setup callback. */
166typedef FNAUDIOTESTSETUP *PFNAUDIOTESTSETUP;
167
168typedef DECLCALLBACKTYPE(int, FNAUDIOTESTEXEC,(PAUDIOTESTENV pTstEnv, void *pvCtx, PAUDIOTESTPARMS pTstParms));
169/** Pointer to an audio test exec callback. */
170typedef FNAUDIOTESTEXEC *PFNAUDIOTESTEXEC;
171
172typedef DECLCALLBACKTYPE(int, FNAUDIOTESTDESTROY,(PAUDIOTESTENV pTstEnv, void *pvCtx));
173/** Pointer to an audio test destroy callback. */
174typedef FNAUDIOTESTDESTROY *PFNAUDIOTESTDESTROY;
175
176/**
177 * Structure for keeping an audio test audio stream.
178 */
179typedef struct AUDIOTESTSTREAM
180{
181 /** The PDM stream. */
182 PPDMAUDIOSTREAM pStream;
183 /** The backend stream. */
184 PPDMAUDIOBACKENDSTREAM pBackend;
185 /** The stream config. */
186 PDMAUDIOSTREAMCFG Cfg;
187 /** Associated mixing stream. Optional. */
188 AUDIOTESTDRVMIXSTREAM Mix;
189} AUDIOTESTSTREAM;
190/** Pointer to audio test stream. */
191typedef AUDIOTESTSTREAM *PAUDIOTESTSTREAM;
192
193/** Maximum audio streams a test environment can handle. */
194#define AUDIOTESTENV_MAX_STREAMS 8
195
196/**
197 * Structure for keeping TCP/IP-specific options.
198 */
199typedef struct AUDIOTESTENVTCPOPTS
200{
201 /** Connection mode(s) to use. */
202 ATSCONNMODE enmConnMode;
203 /** Bind address (server mode). When empty, "0.0.0.0" (any host) will be used. */
204 char szBindAddr[128];
205 /** Bind port (server mode). */
206 uint16_t uBindPort;
207 /** Connection address (client mode). */
208 char szConnectAddr[128];
209 /** Connection port (client mode). */
210 uint16_t uConnectPort;
211} AUDIOTESTENVTCPOPTS;
212/** Pointer to audio test TCP options. */
213typedef AUDIOTESTENVTCPOPTS *PAUDIOTESTENVTCPOPTS;
214
215/**
216 * Structure holding additional I/O options.
217 */
218typedef struct AUDIOTESTIOOPTS
219{
220 /** Whether to use the audio connector or not. */
221 bool fWithDrvAudio;
222 /** Whether to use a mixing buffer or not. */
223 bool fWithMixer;
224 /** Buffer size (in ms). */
225 uint32_t cMsBufferSize;
226 /** Pre-buffering size (in ms). */
227 uint32_t cMsPreBuffer;
228 /** Scheduling (in ms). */
229 uint32_t cMsSchedulingHint;
230 /** Audio vlume to use (in percent). */
231 uint8_t uVolumePercent;
232 /** PCM audio properties to use. */
233 PDMAUDIOPCMPROPS Props;
234} AUDIOTESTIOOPTS;
235/** Pointer to additional playback options. */
236typedef AUDIOTESTIOOPTS *PAUDIOTESTIOOPTS;
237
238/**
239 * Structure for keeping a user context for the test service callbacks.
240 */
241typedef struct ATSCALLBACKCTX
242{
243 /** The test environment bound to this context. */
244 PAUDIOTESTENV pTstEnv;
245 /** Absolute path to the packed up test set archive.
246 * Keep it simple for now and only support one (open) archive at a time. */
247 char szTestSetArchive[RTPATH_MAX];
248 /** File handle to the (opened) test set archive for reading. */
249 RTFILE hTestSetArchive;
250 /** Number of currently connected clients. */
251 uint8_t cClients;
252} ATSCALLBACKCTX;
253typedef ATSCALLBACKCTX *PATSCALLBACKCTX;
254
255/**
256 * Audio test environment parameters.
257 *
258 * This is global to all tests defined.
259 */
260typedef struct AUDIOTESTENV
261{
262 /** Audio testing mode. */
263 AUDIOTESTMODE enmMode;
264 /** Failsafe timeout (in ms). Defaults to AUDIOTEST_TIMEOUT_DEFAULT_MS. */
265 RTMSINTERVAL msTimeout;
266 /** Whether self test mode is active or not. */
267 bool fSelftest;
268 /** Whether skip the actual verification or not. */
269 bool fSkipVerify;
270 /** Name of the audio device to use.
271 * If empty the default audio device will be used. */
272 char szDev[128];
273 /** Zero-based index of current test (will be increased for every run test). */
274 uint32_t idxTest;
275 /** Number of iterations for *all* tests specified.
276 * When set to 0 (default), a random value (see specific test) will be chosen. */
277 uint32_t cIterations;
278 /** I/O options to use. */
279 AUDIOTESTIOOPTS IoOpts;
280 /** Test tone parameters to use. */
281 AUDIOTESTTONEPARMS ToneParms;
282 /** Output path for storing the test environment's final test files. */
283 char szTag[AUDIOTEST_TAG_MAX];
284 /** Output path for storing the test environment's final test files. */
285 char szPathOut[RTPATH_MAX];
286 /** Temporary path for this test environment. */
287 char szPathTemp[RTPATH_MAX];
288 /** Pointer to audio test driver stack to use. */
289 PAUDIOTESTDRVSTACK pDrvStack;
290 /** Audio stream. */
291 AUDIOTESTSTREAM aStreams[AUDIOTESTENV_MAX_STREAMS];
292 /** The audio test set to use. */
293 AUDIOTESTSET Set;
294 /** TCP options to use for ATS. */
295 AUDIOTESTENVTCPOPTS TcpOpts;
296 /** ATS server instance to use.
297 * NULL if not in use. */
298 PATSSERVER pSrv;
299 /** ATS callback context to use. */
300 ATSCALLBACKCTX CallbackCtx;
301 union
302 {
303 struct
304 {
305 /** Client connected to the ATS on the guest side. */
306 ATSCLIENT AtsClGuest;
307 /** Path to the guest's test set downloaded to the host. */
308 char szPathTestSetGuest[RTPATH_MAX];
309 /** Client connected to the Validation Kit audio driver ATS. */
310 ATSCLIENT AtsClValKit;
311 /** Path to the Validation Kit audio driver's test set downloaded to the host. */
312 char szPathTestSetValKit[RTPATH_MAX];
313 } Host;
314 } u;
315} AUDIOTESTENV;
316
317/**
318 * Audio test descriptor.
319 */
320typedef struct AUDIOTESTDESC
321{
322 /** (Sort of) Descriptive test name. */
323 const char *pszName;
324 /** Flag whether the test is excluded. */
325 bool fExcluded;
326 /** The setup callback. */
327 PFNAUDIOTESTSETUP pfnSetup;
328 /** The exec callback. */
329 PFNAUDIOTESTEXEC pfnExec;
330 /** The destruction callback. */
331 PFNAUDIOTESTDESTROY pfnDestroy;
332} AUDIOTESTDESC;
333
334/**
335 * Backend description.
336 */
337typedef struct AUDIOTESTBACKENDDESC
338{
339 /** The driver registration structure. */
340 PCPDMDRVREG pDrvReg;
341 /** The backend name.
342 * Aliases are implemented by having multiple entries for the same backend. */
343 const char *pszName;
344} AUDIOTESTBACKENDDESC;
345
346/**
347 * VKAT command table entry.
348 */
349typedef struct VKATCMD
350{
351 /** The command name. */
352 const char *pszCommand;
353 /** The command handler. */
354 DECLCALLBACKMEMBER(RTEXITCODE, pfnHandler,(PRTGETOPTSTATE pGetState));
355
356 /** Command description. */
357 const char *pszDesc;
358 /** Options array. */
359 PCRTGETOPTDEF paOptions;
360 /** Number of options in the option array. */
361 size_t cOptions;
362 /** Gets help for an option. */
363 DECLCALLBACKMEMBER(const char *, pfnOptionHelp,(PCRTGETOPTDEF pOpt));
364 /** Flag indicating if the command needs the ATS transport layer.
365 * Needed for command line parsing. */
366 bool fNeedsTransport;
367} VKATCMD;
368/** Pointer to a const VKAT command entry. */
369typedef VKATCMD const *PCVKATCMD;
370
371
372/*********************************************************************************************************************************
373* Global Variables *
374*********************************************************************************************************************************/
375/** Terminate ASAP if set. Set on Ctrl-C. */
376extern bool volatile g_fTerminate;
377/** The release logger. */
378extern PRTLOGGER g_pRelLogger;
379
380/** The test handle. */
381extern RTTEST g_hTest;
382/** The current verbosity level. */
383extern unsigned g_uVerbosity;
384/** DrvAudio: Enable debug (or not). */
385extern bool g_fDrvAudioDebug;
386/** DrvAudio: The debug output path. */
387extern 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;
391
392extern const VKATCMD g_CmdTest;
393extern const VKATCMD g_CmdVerify;
394extern const VKATCMD g_CmdBackends;
395extern const VKATCMD g_CmdEnum;
396extern const VKATCMD g_CmdPlay;
397extern const VKATCMD g_CmdRec;
398extern const VKATCMD g_CmdSelfTest;
399
400
401extern AUDIOTESTDESC g_aTests[];
402extern unsigned g_cTests;
403
404extern AUDIOTESTBACKENDDESC const g_aBackends[];
405extern unsigned g_cBackends;
406
407
408/*********************************************************************************************************************************
409* Prototypes *
410*********************************************************************************************************************************/
411
412/** @name Command line handlers
413 * @{ */
414RTEXITCODE audioTestUsage(PRTSTREAM pStrm, PCVKATCMD pOnlyCmd);
415RTEXITCODE audioTestVersion(void);
416void audioTestShowLogo(PRTSTREAM pStream);
417/** @} */
418
419/** @name Driver stack
420 * @{ */
421int AudioTestDriverStackPerformSelftest(void);
422
423void audioTestDriverStackDelete(PAUDIOTESTDRVSTACK pDrvStack);
424int audioTestDriverStackInitEx(PAUDIOTESTDRVSTACK pDrvStack, PCPDMDRVREG pDrvReg, bool fEnabledIn, bool fEnabledOut, bool fWithDrvAudio);
425int audioTestDriverStackInit(PAUDIOTESTDRVSTACK pDrvStack, PCPDMDRVREG pDrvReg, bool fWithDrvAudio);
426int audioTestDriverStackProbe(PAUDIOTESTDRVSTACK pDrvStack, bool fEnabledIn, bool fEnabledOut, bool fWithDrvAudio);
427int audioTestDriverStackSetDevice(PAUDIOTESTDRVSTACK pDrvStack, PDMAUDIODIR enmDir, const char *pszDevId);
428/** @} */
429
430/** @name Driver
431 * @{ */
432int audioTestDrvConstruct(PAUDIOTESTDRVSTACK pDrvStack, PCPDMDRVREG pDrvReg, PPDMDRVINS pParentDrvIns, PPPDMDRVINS ppDrvIns);
433/** @} */
434
435/** @name Driver stack stream
436 * @{ */
437int audioTestDriverStackStreamCreateInput(PAUDIOTESTDRVSTACK pDrvStack, PCPDMAUDIOPCMPROPS pProps,
438 uint32_t cMsBufferSize, uint32_t cMsPreBuffer, uint32_t cMsSchedulingHint,
439 PPDMAUDIOSTREAM *ppStream, PPDMAUDIOSTREAMCFG pCfgAcq);
440int audioTestDriverStackStreamCreateOutput(PAUDIOTESTDRVSTACK pDrvStack, PCPDMAUDIOPCMPROPS pProps,
441 uint32_t cMsBufferSize, uint32_t cMsPreBuffer, uint32_t cMsSchedulingHint,
442 PPDMAUDIOSTREAM *ppStream, PPDMAUDIOSTREAMCFG pCfgAcq);
443void audioTestDriverStackStreamDestroy(PAUDIOTESTDRVSTACK pDrvStack, PPDMAUDIOSTREAM pStream);
444int audioTestDriverStackStreamDrain(PAUDIOTESTDRVSTACK pDrvStack, PPDMAUDIOSTREAM pStream, bool fSync);
445int audioTestDriverStackStreamEnable(PAUDIOTESTDRVSTACK pDrvStack, PPDMAUDIOSTREAM pStream);
446int AudioTestDriverStackStreamDisable(PAUDIOTESTDRVSTACK pDrvStack, PPDMAUDIOSTREAM pStream);
447bool audioTestDriverStackStreamIsOkay(PAUDIOTESTDRVSTACK pDrvStack, PPDMAUDIOSTREAM pStream);
448uint32_t audioTestDriverStackStreamGetWritable(PAUDIOTESTDRVSTACK pDrvStack, PPDMAUDIOSTREAM pStream);
449int audioTestDriverStackStreamPlay(PAUDIOTESTDRVSTACK pDrvStack, PPDMAUDIOSTREAM pStream, void const *pvBuf,
450 uint32_t cbBuf, uint32_t *pcbPlayed);
451uint32_t audioTestDriverStackStreamGetReadable(PAUDIOTESTDRVSTACK pDrvStack, PPDMAUDIOSTREAM pStream);
452int audioTestDriverStackStreamCapture(PAUDIOTESTDRVSTACK pDrvStack, PPDMAUDIOSTREAM pStream,
453 void *pvBuf, uint32_t cbBuf, uint32_t *pcbCaptured);
454/** @} */
455
456/** @name Backend handling
457 * @{ */
458PCPDMDRVREG AudioTestGetDefaultBackend(void);
459PCPDMDRVREG AudioTestFindBackendOpt(const char *pszBackend);
460/** @} */
461
462/** @name Mixing stream
463 * @{ */
464int AudioTestMixStreamInit(PAUDIOTESTDRVMIXSTREAM pMix, PAUDIOTESTDRVSTACK pDrvStack, PPDMAUDIOSTREAM pStream,
465 PCPDMAUDIOPCMPROPS pProps, uint32_t cMsBuffer);
466void AudioTestMixStreamTerm(PAUDIOTESTDRVMIXSTREAM pMix);
467int AudioTestMixStreamEnable(PAUDIOTESTDRVMIXSTREAM pMix);
468int AudioTestMixStreamDrain(PAUDIOTESTDRVMIXSTREAM pMix, bool fSync);
469int AudioTestMixStreamDisable(PAUDIOTESTDRVMIXSTREAM pMix);
470bool AudioTestMixStreamIsOkay(PAUDIOTESTDRVMIXSTREAM pMix);
471uint32_t AudioTestMixStreamGetWritable(PAUDIOTESTDRVMIXSTREAM pMix);
472int AudioTestMixStreamPlay(PAUDIOTESTDRVMIXSTREAM pMix, void const *pvBuf, uint32_t cbBuf, uint32_t *pcbPlayed);
473uint32_t AudioTestMixStreamGetReadable(PAUDIOTESTDRVMIXSTREAM pMix);
474int AudioTestMixStreamCapture(PAUDIOTESTDRVMIXSTREAM pMix, void *pvBuf, uint32_t cbBuf, uint32_t *pcbCaptured);
475void AudioTestMixStreamSetVolume(PAUDIOTESTDRVMIXSTREAM pMix, uint8_t uVolumePercent);
476/** @} */
477
478/** @name Device handling
479 * @{ */
480int audioTestDeviceOpen(PPDMAUDIOHOSTDEV pDev);
481int audioTestDeviceClose(PPDMAUDIOHOSTDEV pDev);
482
483int audioTestDevicesEnumerateAndCheck(PAUDIOTESTDRVSTACK pDrvStack, const char *pszDev, PPDMAUDIOHOSTDEV *ppDev);
484/** @} */
485
486/** @name ATS routines
487 * @{ */
488int audioTestEnvConnectToValKitAts(PAUDIOTESTENV pTstEnv,
489 const char *pszHostTcpAddr, uint32_t uHostTcpPort);
490/** @} */
491
492/** @name Test environment handling
493 * @{ */
494void audioTestEnvInit(PAUDIOTESTENV pTstEnv);
495int audioTestEnvCreate(PAUDIOTESTENV pTstEnv, PAUDIOTESTDRVSTACK pDrvStack);
496void audioTestEnvDestroy(PAUDIOTESTENV pTstEnv);
497int audioTestEnvPrologue(PAUDIOTESTENV pTstEnv, bool fPack, char *pszPackFile, size_t cbPackFile);
498
499void audioTestParmsInit(PAUDIOTESTPARMS pTstParms);
500void audioTestParmsDestroy(PAUDIOTESTPARMS pTstParms);
501/** @} */
502
503int audioTestWorker(PAUDIOTESTENV pTstEnv);
504
505/** @todo Test tone handling */
506int audioTestPlayTone(PAUDIOTESTIOOPTS pIoOpts, PAUDIOTESTENV pTstEnv, PAUDIOTESTSTREAM pStream, PAUDIOTESTTONEPARMS pParms);
507void audioTestToneParmsInit(PAUDIOTESTTONEPARMS pToneParms);
508/** @} */
509
510void audioTestIoOptsInitDefaults(PAUDIOTESTIOOPTS pIoOpts);
511
512
513/*********************************************************************************************************************************
514* Common command line stuff *
515*********************************************************************************************************************************/
516
517/**
518 * Common long options values.
519 */
520enum
521{
522 AUDIO_TEST_OPT_CMN_DAEMONIZE = 256,
523 AUDIO_TEST_OPT_CMN_DAEMONIZED,
524 AUDIO_TEST_OPT_CMN_DEBUG_AUDIO_ENABLE,
525 AUDIO_TEST_OPT_CMN_DEBUG_AUDIO_PATH,
526 AUDIO_TEST_OPT_CMN_DRVHOST_CACHE_ENABLED
527};
528
529/** For use in the option switch to handle common options. */
530#define AUDIO_TEST_COMMON_OPTION_CASES(a_ValueUnion, a_pCmd) \
531 case 'q': \
532 g_uVerbosity = 0; \
533 if (g_pRelLogger) \
534 RTLogGroupSettings(g_pRelLogger, "all=0 all.e"); \
535 break; \
536 \
537 case 'v': \
538 /* No-op here, has been handled by main() already. */ /** @todo r-bird: -q works, so -v must too! */ \
539 break; \
540 \
541 case 'V': \
542 return audioTestVersion(); \
543 \
544 case 'h': \
545 return audioTestUsage(g_pStdOut, a_pCmd); \
546 \
547 case AUDIO_TEST_OPT_CMN_DEBUG_AUDIO_ENABLE: \
548 g_fDrvAudioDebug = true; \
549 break; \
550 \
551 case AUDIO_TEST_OPT_CMN_DRVHOST_CACHE_ENABLED: \
552 g_fDrvHostAudioCacheEnabled = a_ValueUnion.f; \
553 break; \
554 \
555 case AUDIO_TEST_OPT_CMN_DEBUG_AUDIO_PATH: \
556 g_pszDrvAudioDebug = a_ValueUnion.psz; \
557 break; \
558 case AUDIO_TEST_OPT_CMN_DAEMONIZE: \
559 break; \
560 case AUDIO_TEST_OPT_CMN_DAEMONIZED: \
561 break;
562
563#endif /* !VBOX_INCLUDED_SRC_audio_vkatInternal_h */
564
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette