|
Twitch SDK (Internal)
|
#include <audioconverter.h>
Public Member Functions | |
| virtual void | BindInputBuffer (const void *buffer, SampleRange range)=0 |
| virtual SampleRange | GetOutputSampleRange () const =0 |
| virtual SampleRange | TransferToOutputBuffer (void *buffer, SampleRange range)=0 |
| virtual void | UnbindInputBuffer ()=0 |
An interface for converting PCM audio data from one format to another.
Note that some of the operations during audio conversion may require some data to be maintained from the previous binding. Hence, unbinding the buffer may result in some portion of the samples at the end of the range being copied into an internal buffer. In order to maintain continuity of the converter's output, the client must bind contiguous input buffers in chronological order. Otherwise, the output data may contain gaps.
|
pure virtual |
Binds a buffer of input data to converter. Calling this function when an input buffer is already bound to the converter is undefined behavior.
| buffer | The input buffer to bind. |
| range | The range of values, in the input buffer format's domain, that is represented by the input buffer. |
Implemented in ttv::AudioConverter< InputBufferFormat, OutputBufferFormat, AudioConvertOptions >.
|
pure virtual |
Returns the range, in the output buffer format's domain, that is currently available in the converter. Calling this function when an input buffer is not bound is undefined behavior.
Implemented in ttv::AudioConverter< InputBufferFormat, OutputBufferFormat, AudioConvertOptions >.
|
pure virtual |
Transfers data to the passed output buffer. Calling this function when an input buffer is not bound to the converter is undefined behavior. This function will transfer data in a range that is available for reading (from the converter) and writing (the passed sample range), i.e. the intersection of the two ranges. If no data was transferred, this function will return a range of {0, 0}
| buffer | The output buffer to transfer data into. |
| range | The range of values, in the output buffer format's domain, that is represented by the output buffer. |
Implemented in ttv::AudioConverter< InputBufferFormat, OutputBufferFormat, AudioConvertOptions >.
|
pure virtual |
Unbinds the currently bound buffer of input data. Calling this function when an input buffer is not bound to the converter is undefined behavior.
Implemented in ttv::AudioConverter< InputBufferFormat, OutputBufferFormat, AudioConvertOptions >.
1.8.13