#include <audio_fifo_buffer.hpp>
|
| | AudioFifoBuffer ()=default |
| | AudioFifoBuffer (const size_t num_channels, const size_t num_frames) |
| | Constructs a queue with a given number of elements.
|
| bool | write (const AudioBuffer< T > &src) |
| | Writes audio data to the buffer.
|
| bool | write (const T *const *src, const size_t num_channels, const size_t number_of_frames) |
| | Writes audio data to the buffer.
|
| bool | read (AudioBuffer< T > &dst) |
| | Reads audio data from the buffer.
|
| bool | read (T *const *dst, const size_t num_channels, const size_t number_of_frames) |
| | Reads audio data from the buffer.
|
| template<class SrcType, class SrcByteOrder, class SrcInterleaving> |
| bool | write_from_data (const SrcType *data, const size_t num_frames) |
| | Writes audio data into the buffer, converting the source data to the buffer's format.
|
| template<class DstType, class DstByteOrder, class DstInterleaving> |
| bool | read_to_data (DstType *data, const size_t num_frames) |
| | Reads audio data from the buffer, converting the data to the destination format.
|
| void | resize (const size_t num_channels, const size_t num_frames) |
| | Resizes this buffer, clearing existing data.
|
| size_t | num_channels () const |
| size_t | num_frames () const |
| void | reset () |
| | Clears the buffer.
|
| size_t | size () |
template<class T, class F = Fifo::Single>
class rav::AudioFifoBuffer< T, F >
Definition at line 37 of file audio_fifo_buffer.hpp.
◆ AudioFifoBuffer() [1/2]
template<class T, class F = Fifo::Single>
◆ AudioFifoBuffer() [2/2]
template<class T, class F = Fifo::Single>
| rav::AudioFifoBuffer< T, F >::AudioFifoBuffer |
( |
const size_t | num_channels, |
|
|
const size_t | num_frames ) |
|
inlineexplicit |
Constructs a queue with a given number of elements.
- Parameters
-
Definition at line 46 of file audio_fifo_buffer.hpp.
◆ num_channels()
template<class T, class F = Fifo::Single>
◆ num_frames()
template<class T, class F = Fifo::Single>
◆ read() [1/2]
template<class T, class F = Fifo::Single>
Reads audio data from the buffer.
- Parameters
-
- Returns
- True if reading was successful, false if there was not enough data to read.
Definition at line 87 of file audio_fifo_buffer.hpp.
◆ read() [2/2]
template<class T, class F = Fifo::Single>
| bool rav::AudioFifoBuffer< T, F >::read |
( |
T *const * | dst, |
|
|
const size_t | num_channels, |
|
|
const size_t | number_of_frames ) |
|
inline |
Reads audio data from the buffer.
- Parameters
-
| dst | Destination buffers. |
| num_channels | Number of channels in the destination buffers. |
| number_of_frames | Number of frames to read. |
- Returns
- True if reading was successful, false if there was not enough data to read.
Definition at line 98 of file audio_fifo_buffer.hpp.
◆ read_to_data()
template<class T, class F = Fifo::Single>
template<class DstType, class DstByteOrder, class DstInterleaving>
Reads audio data from the buffer, converting the data to the destination format.
- Template Parameters
-
| DstType | The type of the destination data. |
| DstByteOrder | The byte order of the destination data. |
| DstInterleaving | The interleaving of the destination data. |
- Parameters
-
| data | The destination buffer. |
| num_frames | The number of frames to read and write. |
- Returns
- True if reading was successful, false if there was not enough data to read.
Definition at line 158 of file audio_fifo_buffer.hpp.
◆ reset()
template<class T, class F = Fifo::Single>
◆ resize()
template<class T, class F = Fifo::Single>
◆ size()
template<class T, class F = Fifo::Single>
◆ write() [1/2]
template<class T, class F = Fifo::Single>
Writes audio data to the buffer.
- Parameters
-
- Returns
- True if writing was successful, false if there was not enough space to write all data.
Definition at line 55 of file audio_fifo_buffer.hpp.
◆ write() [2/2]
template<class T, class F = Fifo::Single>
| bool rav::AudioFifoBuffer< T, F >::write |
( |
const T *const * | src, |
|
|
const size_t | num_channels, |
|
|
const size_t | number_of_frames ) |
|
inline |
Writes audio data to the buffer.
- Parameters
-
| src | Source data. |
| num_channels | Number of channels in the source data. |
| number_of_frames | Number of frames in the source data. |
- Returns
- True if writing was successful, false if there was not enough space to write all data.
Definition at line 66 of file audio_fifo_buffer.hpp.
◆ write_from_data()
template<class T, class F = Fifo::Single>
template<class SrcType, class SrcByteOrder, class SrcInterleaving>
| bool rav::AudioFifoBuffer< T, F >::write_from_data |
( |
const SrcType * | data, |
|
|
const size_t | num_frames ) |
|
inline |
Writes audio data into the buffer, converting the source data to the buffer's format.
- Template Parameters
-
| SrcType | The type of the source data. |
| SrcByteOrder | The byte order of the source data. |
| SrcInterleaving | The interleaving of the source data. |
- Parameters
-
| data | The destination buffer. |
| num_frames | The number of frames to read and write. |
- Returns
- True if reading was successful, false if there was not enough data to read.
Definition at line 124 of file audio_fifo_buffer.hpp.
The documentation for this class was generated from the following file: