![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
#include <roc_audio/frame_factory.h>

Public Member Functions | |
| FrameFactory (core::IArena &arena, size_t buffer_size) | |
Initialize with default pools. buffer_size defines number of bytes in frame buffer. | |
| FrameFactory (core::IPool &buffer_pool) | |
Initialize with custom pools. buffer_pool is a pool of core::Buffer objects. | |
| size_t | byte_buffer_size () const |
| Get number of bytes in byte buffer. | |
| core::Slice< uint8_t > | new_byte_buffer () |
| Allocate byte buffer. | |
| size_t | raw_buffer_size () const |
| Get number of samples in raw sample buffer. | |
| core::Slice< sample_t > | new_raw_buffer () |
| Allocate raw sample buffer. | |
Frame factory.
Allows allocating frames and frame buffers (byte buffers of appropriate size that should be attached to frame to hold payload).
Serves several purposes:
Definition at line 38 of file frame_factory.h.
| roc::audio::FrameFactory::FrameFactory | ( | core::IArena & | arena, |
| size_t | buffer_size | ||
| ) |
Initialize with default pools. buffer_size defines number of bytes in frame buffer.
| roc::audio::FrameFactory::FrameFactory | ( | core::IPool & | buffer_pool | ) |
Initialize with custom pools. buffer_pool is a pool of core::Buffer objects.
| size_t roc::audio::FrameFactory::byte_buffer_size | ( | ) | const |
Get number of bytes in byte buffer.
| core::Slice< uint8_t > roc::audio::FrameFactory::new_byte_buffer | ( | ) |
Allocate byte buffer.
| core::Slice< sample_t > roc::audio::FrameFactory::new_raw_buffer | ( | ) |
Allocate raw sample buffer.
| size_t roc::audio::FrameFactory::raw_buffer_size | ( | ) | const |
Get number of samples in raw sample buffer.