PartyAudioManipulationSourceStream::GetNextBuffer
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 will be 0 and its buffer field will be 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 will be available every 40 ms. Otherwise, no buffers will be available. Buffers retrieved by this method must be returned to the library via PartyAudioManipulationSourceStream::ReturnBuffer() when they are 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 will be 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
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för