DrvAudioVRDE.cpp revision 97a3cb3696a8e4509f9de8372fd629f814fe8f61
1N/A * available from http://www.virtualbox.org. This file is free software;
1N/A#include "DrvAudioVRDE.h"
1N/A#include "ConsoleImpl.h"
1N/A#include "ConsoleVRDPServer.h"
1N/A#include "../../Devices/Audio/DrvAudio.h"
1N/A#include "../../Devices/Audio/AudioMixBuffer.h"
1N/Atypedef struct DRVAUDIOVRDE
1N/Atypedef struct VRDESTREAMIN
1N/Atypedef struct VRDESTREAMOUT
1N/A return VINF_SUCCESS;
if (pcSamples)
if (pcSamples)
static DECLCALLBACK(int) drvAudioVRDECaptureIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
int rc;
&cProcessed);
return rc;
static DECLCALLBACK(int) drvAudioVRDEPlayOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
uint32_t cSamplesPlayed = (int)((2 * ticks * pHstStrmOut->Props.uHz + ticks_per_second) / ticks_per_second / 2);
if (!cSamplesPlayed)
LogFlowFunc(("uFreq=%RU32, cChan=%RU8, cBits=%RU8, fSigned=%RTbool, enmFormat=%ld, cSamplesToSend=%RU32\n",
&& cRead)
if (pcSamplesPlayed)
return rc;
static DECLCALLBACK(int) drvAudioVRDEFiniIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn)
return VINF_SUCCESS;
static DECLCALLBACK(int) drvAudioVRDEFiniOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut)
return VINF_SUCCESS;
static DECLCALLBACK(int) drvAudioVRDEControlOut(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMOUT pHstStrmOut,
return VINF_SUCCESS;
static DECLCALLBACK(int) drvAudioVRDEControlIn(PPDMIHOSTAUDIO pInterface, PPDMAUDIOHSTSTRMIN pHstStrmIn,
return VINF_SUCCESS;
int rc;
rc = pDrv->pConsoleVRDPServer->SendAudioInputBegin(NULL, pVRDEStrmIn, audioMixBufSize(&pThisStrmIn->MixBuf),
return rc;
return VINF_SUCCESS;
return NULL;
if (mpDrv)
return VERR_INVALID_STATE;
return VINF_SUCCESS;
return rc;
return VINF_SUCCESS;
void *pvUser;
AssertMsgRCReturn(rc, ("Confguration error: No/bad \"ObjectVRDPServer\" value, rc=%Rrc\n", rc), rc);
* Get the interface for the above driver (DrvAudio) to make mixer/conversion calls.
AssertMsgReturn(pThis->pDrvAudio, ("Configuration error: No upper interface specified!\n"), VERR_PDM_MISSING_INTERFACE_ABOVE);
return VINF_SUCCESS;
sizeof(DRVAUDIOVRDE),
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,