Base class for Pipeline modules that aquire and dispatch audio buffers (like Producer::File)
More...
#include <Pipeline.hpp>
|
| using | Iterator = details::Iterator< decltype(_subscribers)> |
| | Iterator pointing to a subscriber of this producer.
|
| |
Base class for Pipeline modules that aquire and dispatch audio buffers (like Producer::File)
◆ Iterator
Iterator pointing to a subscriber of this producer.
◆ ProducerModule() [1/3]
| ProducerModule::ProducerModule |
( |
| ) |
|
◆ ProducerModule() [2/3]
◆ ~ProducerModule()
| ProducerModule::~ProducerModule |
( |
| ) |
|
|
pure virtualdefault |
◆ ProducerModule() [3/3]
| Vsdk::Audio::ProducerModule::ProducerModule |
( |
ProducerModule const & |
| ) |
|
|
delete |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ subscribeFirst()
| auto ProducerModule::subscribeFirst |
( |
AudioCallback |
c | ) |
-> Iterator |
Subscribes as first in the list of audio buffer receivers for this producer.
◆ subscribeLast()
| auto ProducerModule::subscribeLast |
( |
AudioCallback |
c | ) |
-> Iterator |
Subscribes as last in the list of audio buffer receivers for this producer.
◆ unsubscribe()
| void ProducerModule::unsubscribe |
( |
Iterator |
it | ) |
|
Unsubscribes from this producer audio buffer dispatch list.
◆ lastError()
| auto ProducerModule::lastError |
( |
| ) |
const -> std::string const & |
◆ isOpened()
| bool ProducerModule::isOpened |
( |
| ) |
const |
◆ isStarted()
| bool ProducerModule::isStarted |
( |
| ) |
const |
◆ isRunning()
| bool ProducerModule::isRunning |
( |
| ) |
const |
◆ open()
| bool ProducerModule::open |
( |
| ) |
|
|
noexcept |
Attempts to open the underlying resource(s) of the producer.
- Note
-
Blocking call
-
lastError() is reset at the beginning of this function
- Postcondition
isOpened() == true
◆ run()
| bool ProducerModule::run |
( |
| ) |
|
|
noexcept |
- Note
-
Blocking call
-
lastError() is reset at the beginning of this function
- Warning
- Do not override if you do not support synchronous operations!
- Precondition
isOpened() == true
- Postcondition
-
◆ start()
| bool ProducerModule::start |
( |
| ) |
|
|
noexcept |
- Note
-
Non-blocking call: producer might not be started right after this
-
Doesn't actually try to start if
isStarted() == true
-
lastError() is reset at the beginning of this function
- Warning
- Do not override if you do not support async operations!
- Precondition
isOpened() == true
◆ stop()
| bool ProducerModule::stop |
( |
| ) |
|
|
noexcept |
Attempts to stop a started producer.
- Note
-
Non-blocking call: producer might still be started after this call
-
Doesn't actually try to stop if
isStarted() == false
-
lastError() is reset at the beginning of this function
- Warning
- Do not override if you do not support async operations!
◆ close()
| bool ProducerModule::close |
( |
| ) |
|
|
noexcept |
- Note
- <lu> Doesn't do anything is producer has not been opened yet
lastError() is reset at the beginning of this function
- Warning
-
Attempting to close a running producer will fail
-
Attempting to close a started producer will first try to close it </lu>
- Postcondition
-
◆ openImpl()
| void ProducerModule::openImpl |
( |
| ) |
|
|
protectedvirtual |
◆ runImpl()
| void ProducerModule::runImpl |
( |
| ) |
|
|
protectedvirtual |
◆ startImpl()
| void ProducerModule::startImpl |
( |
| ) |
|
|
protectedvirtual |
◆ stopImpl()
| void ProducerModule::stopImpl |
( |
| ) |
|
|
protectedvirtual |
◆ closeImpl()
| void ProducerModule::closeImpl |
( |
| ) |
|
|
protectedvirtual |
◆ setLastError() [1/2]
template<typename... Args>
| void Vsdk::Audio::ProducerModule::setLastError |
( |
char const * |
fmt, |
|
|
Args &&... |
args |
|
) |
| |
|
protected |
◆ setLastError() [2/2]
| void ProducerModule::setLastError |
( |
std::string |
error | ) |
|
|
protected |
◆ dispatchBuffer()
| void ProducerModule::dispatchBuffer |
( |
Buffer |
buffer, |
|
|
bool |
last |
|
) |
| |
|
protected |
◆ dispatchAudio()
template<typename T >
| void Vsdk::Audio::ProducerModule::dispatchAudio |
( |
T && |
data, |
|
|
int |
sampleRate, |
|
|
int |
channelCount, |
|
|
bool |
isLast |
|
) |
| |
|
protected |
◆ _opened
| std::atomic_bool Vsdk::Audio::ProducerModule::_opened |
|
protected |
◆ _started
| std::atomic_bool Vsdk::Audio::ProducerModule::_started |
|
protected |
◆ _running
| std::atomic_bool Vsdk::Audio::ProducerModule::_running |
|
protected |