Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the next buffer available in the stream.
Syntax
PartyError GetNextBuffer(
PartyMutableDataBuffer* buffer
)
Parameters
buffer
PartyMutableDataBuffer*
output
The output buffer. If no buffer is available, the PartyMutableDataBuffer's bufferByteCount field is 0, and its buffer field is nullptr.
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
When voice activity is detected, a new buffer is available every 40 ms. Otherwise, no buffers are available. Buffers retrieved by this method must be returned to the library via PartyAudioManipulationSourceStream::ReturnBuffer() when they're done being used.
The total number of buffers instantaneously available can be retrieved via PartyAudioManipulationSourceStream::GetAvailableBufferCount(). Multiple buffers can be retrieved in succession before any are returned.
Each buffer is in the format specified by PartyAudioManipulationSourceStream::GetFormat().
A mutable data buffer is provided so that the app can optionally modify the audio in place.
Requirements
Header: Party.h
See also
PartyAudioManipulationSourceStream
PartyAudioManipulationSourceStream::GetFormat
PartyAudioManipulationSourceStream::ReturnBuffer