Data Structures | |
| struct | MLO_SampleFormat |
| Information about the encoding, memory layout, sample rate and number of channels of the PCM audio data represented by an MLO_SampleBuffer object. More... | |
Typedefs | |
| typedef MLO_SampleBuffer | MLO_SampleBuffer |
| MLO_SampleBuffer object. | |
Enumerations | |
| enum | MLO_SampleType { MLO_SAMPLE_TYPE_INTERLACED_SIGNED = 0 } |
| Sample type indicating the way PCM sample values are encoded and layed out in memory. More... | |
Functions | |
| MLO_Result | MLO_SampleBuffer_Create (MLO_Size size, MLO_SampleBuffer **buffer) |
| Create a new instance of an MLO_SampleBuffer object. | |
| MLO_Result | MLO_SampleBuffer_Destroy (MLO_SampleBuffer *self) |
| Destroy an MLO_SampleBuffer object and free the resources associated with it. | |
| const void * | MLO_SampleBuffer_GetSamples (const MLO_SampleBuffer *self) |
| Return a (const) pointer to the memory buffer containing the PCM audio samples encapsulated by an MLO_SampleBuffer object. | |
| void * | MLO_SampleBuffer_UseSamples (MLO_SampleBuffer *self) |
| Return a pointer to the memory buffer containing the PCM audio samples encapsulated by an MLO_SampleBuffer object. | |
| MLO_Cardinal | MLO_SampleBuffer_GetSampleCount (const MLO_SampleBuffer *self) |
| Return the number of audio samples encapsulated in a MLO_SampleBuffer object. | |
| MLO_Result | MLO_SampleBuffer_SetSampleCount (MLO_SampleBuffer *self, MLO_Cardinal sample_count) |
| Set the number of audio samples encapsulated in a MLO_SampleBuffer object. | |
| MLO_Size | MLO_SampleBuffer_GetSize (const MLO_SampleBuffer *self) |
| Return the size of the buffer encapsulated in a MLO_SampleBuffer object. | |
| const MLO_SampleFormat * | MLO_SampleBuffer_GetFormat (const MLO_SampleBuffer *self) |
| Return the format of the PCM samples encapsulated by an MLO_SampleBuffer object. | |
| void | MLO_SampleBuffer_SetFormat (MLO_SampleBuffer *self, const MLO_SampleFormat *format) |
| Sets the format of the PCM samples encapsulated by an MLO_SampleBuffer object. | |
| typedef struct MLO_SampleBuffer MLO_SampleBuffer |
MLO_SampleBuffer object.
An MLO_SampleBuffer object represents a buffer of PCM audio samples.
| enum MLO_SampleType |
Sample type indicating the way PCM sample values are encoded and layed out in memory.
| MLO_Result MLO_SampleBuffer_Create | ( | MLO_Size | size, | |
| MLO_SampleBuffer ** | buffer | |||
| ) |
Create a new instance of an MLO_SampleBuffer object.
NOTE: this method is not intended to be called by clients of the MLO_Decoder API, since this API never takes MLO_SampleBuffer objects as input (always as output).
| size | Size in bytes of the buffer that this object should encapsulate. | |
| buffer | Pointer to a pointer where a pointer to an MLO_SampleBuffer object will be returned. |
| MLO_Result MLO_SampleBuffer_Destroy | ( | MLO_SampleBuffer * | self | ) |
Destroy an MLO_SampleBuffer object and free the resources associated with it.
| self | Pointer to the MLO_SampleBuffer object to destroy. |
| const MLO_SampleFormat* MLO_SampleBuffer_GetFormat | ( | const MLO_SampleBuffer * | self | ) |
Return the format of the PCM samples encapsulated by an MLO_SampleBuffer object.
| self | Pointer to the MLO_SampleBuffer object of which the format should be retuned. |
| MLO_Cardinal MLO_SampleBuffer_GetSampleCount | ( | const MLO_SampleBuffer * | self | ) |
Return the number of audio samples encapsulated in a MLO_SampleBuffer object.
| self | Pointer to the MLO_SampleBuffer object of which the sample count should be retuned. |
| const void* MLO_SampleBuffer_GetSamples | ( | const MLO_SampleBuffer * | self | ) |
Return a (const) pointer to the memory buffer containing the PCM audio samples encapsulated by an MLO_SampleBuffer object.
The returned pointer is maked 'const' to indicate that the caller may read but not write to the memory buffer.
| self | Pointer to the MLO_SampleBuffer object of which the samples should be retuned. |
| MLO_Size MLO_SampleBuffer_GetSize | ( | const MLO_SampleBuffer * | self | ) |
Return the size of the buffer encapsulated in a MLO_SampleBuffer object.
| self | Pointer to the MLO_SampleBuffer object of which the buffer size should be retuned. |
| void MLO_SampleBuffer_SetFormat | ( | MLO_SampleBuffer * | self, | |
| const MLO_SampleFormat * | format | |||
| ) |
Sets the format of the PCM samples encapsulated by an MLO_SampleBuffer object.
NOTE: this method only sets the format information, without doing any conversion on any existing data in the buffer. This method is typically only used by the internal implementation of the decoder, not by clients of the decoder API, since the decoder API never takes MLO_SampleBuffer objects as input.
| self | Pointer to the MLO_SampleBuffer object of which the format should be set. | |
| format | Pointer to an MLO_SampleFormat struct containing the details of the format of the PCM samples encapsulated by this MLO_SampleBuffer object. |
| MLO_Result MLO_SampleBuffer_SetSampleCount | ( | MLO_SampleBuffer * | self, | |
| MLO_Cardinal | sample_count | |||
| ) |
Set the number of audio samples encapsulated in a MLO_SampleBuffer object.
This method is typically only used by the internal implementation of the decoder, not by clients of the decoder API, since the decoder API never takes MLO_SampleBuffer objects as input.
| self | Pointer to the MLO_SampleBuffer object of which the sample count should be set. |
| void* MLO_SampleBuffer_UseSamples | ( | MLO_SampleBuffer * | self | ) |
Return a pointer to the memory buffer containing the PCM audio samples encapsulated by an MLO_SampleBuffer object.
This method is similar to the MLO_SampleBuffer_GetSamples except that the returned pointer is not marked 'const', indicating that the caller may write to the memory buffer.
| self | Pointer to the MLO_SampleBuffer object of which the samples should be retuned. |