post_decode_audio_source_stream::get_next_buffer

Gets the next buffer available in the stream.

Syntax

void get_next_buffer(  
    uint32_t* byteCount,  
    _Outptr_result_bytebuffer_maybenull_ *byteCount  
)  

Parameters

byteCount   _Out_
Type: uint32_t*

A pointer to the number of bytes in the buffer. The number of samples in this buffer can be derived using the bits per sample value in this stream's pre-processed format. If no buffer is available, *byteCount will equal zero.

*byteCount   
Type: _Outptr_result_bytebuffer_maybenull_

Return value

Type: void

Remarks

If there are any new audio buffers for this stream, they will be available for processing every 40ms. Buffers returned by this method must be released to post_decode_audio_source_stream::return_buffer when they are done being used. A maximum of 10 buffers will be held on each audio stream. Once this limit is reached, new buffers will be dropped, and old buffers must be released with post_decode_audio_source_stream::return_buffer before new buffers will become available. Post-decode audio source streams can be filtered by a minimum amount of available data using post_decode_audio_source_stream::get_available_buffer_count. Buffers delivered through this stream have already been preprocessed with Voice Activity Detection (VAD) and Automatic Gain Control (AGC). To interpret the buffer, the caller should use post_decode_audio_source_stream::get_pre_processed_format to examine the number of channels in the buffer, how the channels are arranged in the buffer, and the sample size of the buffer.

Requirements

Header: GameChat2.h

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

post_decode_audio_source_stream
post_decode_audio_source_stream::get_pre_processed_format
post_decode_audio_source_stream::return_buffer