Parsec

ParsecHostStart

ParsecStatusParsecHostStart(Parsec *
ps,
ParsecHostMode
mode,
const ParsecHostConfig *
cfg,
ParsecAudioInjectFunc
inject,
void *
opaque
)

Start accepting guests.

HOST_DESKTOP sessions capture the host computer's entire desktop or any fullscreen application. HOST_DESKTOP is available on Windows and Mac only.

HOST_GAME sessions are intended for integration within a game's render/audio/input loops. HOST_GAME requires that the application call ParsecHostSubmitAudio and ParsecHostD3D11SubmitFrame (or similar) to push data to guests, and call ParsecHostPollInput to process input from guests.

Parameters

DirectionNameDescription
inpsParsec instance returned by ParsecInit.
inmodeHost mode of operation. See details.
incfgHost configuration. May be updated later via ParsecHostSetConfig. May be NULL to use PARSEC_HOST_DEFAULTS.
ininjectThe ParsecAudioInjectFunc function to call, when an audio process needs to be injected for audio cancellation.
inopaqueUser supplied context to be passed through inject.

Returns

Always PARSEC_OK on Windows, otherwise PARSEC_OK in HOST_GAME or PARSEC_NOT_IMPLEMENTED.