Editar

Compartilhar via


PartyAudioManipulationSinkStream::SubmitBuffer

Submits audio to be processed by this sink. Depending on the type of sink, this audio may be transmitted to other chat controls or rendered to the audio output.

Syntax

PartyError SubmitBuffer(  
    const PartyDataBuffer* buffer  
)  

Parameters

buffer   PartyDataBuffer*

The audio buffer. Typically this audio buffer is generated by retrieving the next buffer available from each incoming source stream, and then processing and mixing each buffer based on game logic. This buffer must have the format specified by PartyAudioManipulationSinkStream::GetFormat().

Return value

PartyError

c_partyErrorSuccess if the call succeeded or an error code otherwise. The human-readable form of the error code can be retrieved via PartyManager::GetErrorMessage().

Remarks

Every 40 ms, the next 40 ms of audio from this stream is processed. To prevent audio hiccups, buffers for audio that should be heard continuously should be submitted to this stream at a constant rate.

The buffer is copied to an allocated buffer before PartyAudioManipulationSinkStream::SubmitBuffer() returns and can be immediately freed afterwards.

When applying chat permissions and determining which chat controls should receive audio, audio submitted to a capture sink via this method is treated as microphone audio.

Requirements

Header: Party.h

See also

PartyAudioManipulationSinkStream
PartyChatPermissionOptions