vsdk 8.1.0
 
Loading...
Searching...
No Matches
Vsdk::Audio::BufferModule

#include <BufferModule.hpp>

Inheritance diagram for Vsdk::Audio::BufferModule:
Vsdk::Audio::ProducerModuleImpl< BufferModule > Vsdk::Audio::ConsumerModule Vsdk::Audio::ProducerModule

Public Member Functions

 BufferModule () noexcept
 Constructs a BufferModule with a fireRate of zero.
 
 ~BufferModule () override
 
 BufferModule (size_t fireRate) noexcept
 Constructs a BufferModule with a fireRate of fireRate.
 
auto buffer () -> Buffer &
 
auto buffer () const -> Buffer const &
 
auto fireRate () const -> size_t
 
void setFireRate (size_t fireRate)
 
- Public Member Functions inherited from Vsdk::Audio::ProducerModuleImpl< BufferModule >
 ProducerModuleImpl ()=default
 
- Public Member Functions inherited from Vsdk::Audio::ProducerModule
 ProducerModule ()
 
 ProducerModule (ProducerModule &&)
 
ProducerModuleoperator= (ProducerModule &&)
 
virtual ~ProducerModule ()=0
 
 ProducerModule (ProducerModule const &)=delete
 
ProducerModuleoperator= (ProducerModule const &)=delete
 
auto subscribeFirst (AudioCallback c) -> Iterator
 Subscribes as first in the list of audio buffer receivers for this producer.
 
auto subscribeLast (AudioCallback c) -> Iterator
 Subscribes as last in the list of audio buffer receivers for this producer.
 
void unsubscribe (Iterator it) noexcept
 Unsubscribes from this producer audio buffer dispatch list.
 
auto lastError () const -> std::string
 
auto state () const -> State
 
bool isOpened () const
 
bool isRunning () const
 
bool isStarted () const
 
bool isPaused () const
 
bool isIdle () const
 
bool isClosed () const
 
bool open () noexcept
 Attempts to open the underlying resource(s) of the producer.
 
bool run () noexcept
 
bool start () noexcept
 
bool pause () noexcept
 Attempts to pause a started producer.
 
bool resume () noexcept
 Attempts to resume a paused producer.
 
bool stop () noexcept
 Attempts to stop a started producer.
 
bool close () noexcept
 
- Public Member Functions inherited from Vsdk::Audio::ConsumerModule
virtual ~ConsumerModule ()=default
 
virtual void process (Buffer const &, bool last)=0
 

Protected Member Functions

void openImpl () override
 
void runImpl () override
 
void startImpl () override
 
void stopImpl () override
 
void closeImpl () override
 
- Protected Member Functions inherited from Vsdk::Audio::ProducerModule
virtual void openImpl ()
 
virtual void runImpl ()
 
virtual void startImpl ()
 
virtual void pauseImpl ()
 
virtual void resumeImpl ()
 
virtual void stopImpl ()
 
virtual void closeImpl ()
 
void dispatchBuffer (Buffer buffer, bool last)
 
template<typename T >
void dispatchAudio (T &&data, int sampleRate, int channelCount, bool isLast)
 

Additional Inherited Members

- Public Types inherited from Vsdk::Audio::ProducerModule
enum class  State {
  Closed , Opened , Running , Started ,
  Paused , Idle
}
 
using Iterator = details::Iterator< decltype(_subscribers)>
 Iterator pointing to a subscriber of this producer.
 
- Static Public Member Functions inherited from Vsdk::Audio::ProducerModuleImpl< BufferModule >
static auto make (Args &&... args) -> std::shared_ptr< BufferModule >
 
- Protected Attributes inherited from Vsdk::Audio::ProducerModule
std::atomic< State_state
 

Constructor & Destructor Documentation

◆ BufferModule() [1/2]

BufferModule::BufferModule ( )
noexcept

Constructs a BufferModule with a fireRate of zero.

◆ ~BufferModule()

BufferModule::~BufferModule ( )
override

◆ BufferModule() [2/2]

BufferModule::BufferModule ( size_t  fireRate)
explicitnoexcept

Constructs a BufferModule with a fireRate of fireRate.

Member Function Documentation

◆ buffer() [1/2]

auto Vsdk::Audio::BufferModule::buffer ( ) -> Buffer &

◆ buffer() [2/2]

auto Vsdk::Audio::BufferModule::buffer ( ) const -> Buffer const &

◆ fireRate()

auto Vsdk::Audio::BufferModule::fireRate ( ) const -> size_t

◆ setFireRate()

void Vsdk::Audio::BufferModule::setFireRate ( size_t  fireRate)

◆ openImpl()

void BufferModule::openImpl ( )
overrideprotectedvirtual

Reimplemented from Vsdk::Audio::ProducerModule.

◆ runImpl()

void BufferModule::runImpl ( )
overrideprotectedvirtual

Reimplemented from Vsdk::Audio::ProducerModule.

◆ startImpl()

void BufferModule::startImpl ( )
overrideprotectedvirtual

Reimplemented from Vsdk::Audio::ProducerModule.

◆ stopImpl()

void BufferModule::stopImpl ( )
overrideprotectedvirtual

Reimplemented from Vsdk::Audio::ProducerModule.

◆ closeImpl()

void BufferModule::closeImpl ( )
overrideprotectedvirtual

Reimplemented from Vsdk::Audio::ProducerModule.