vsdk 7.3.2
 
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
 
 BufferModule (size_t fireRate) noexcept
 
 ~BufferModule () override
 
auto buffer () -> Buffer &
 
auto buffer () const -> Buffer const &
 
auto fireRate () const -> size_t
 
void setFireRate (size_t fireRate)
 
bool run () override
 
bool start () override
 
bool stop () override
 
- Public Member Functions inherited from Vsdk::Audio::ProducerModule
virtual ~ProducerModule ()=0
 
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)
 Unsubscribes from this producer audio buffer dispatch list.
 
virtual bool open ()
 
virtual bool run ()
 
virtual bool start ()
 
virtual bool stop ()
 
virtual bool resume ()
 Non-blocking call.
 
virtual bool close ()
 
auto lastError () const -> std::string const &
 
- Public Member Functions inherited from Vsdk::Audio::ConsumerModule
virtual ~ConsumerModule ()=default
 
virtual void process (Buffer const &, bool last)=0
 

Additional Inherited Members

- Public Types inherited from Vsdk::Audio::ProducerModule
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 Member Functions inherited from Vsdk::Audio::ProducerModuleImpl< BufferModule >
 ProducerModuleImpl ()=default
 
- Protected Member Functions inherited from Vsdk::Audio::ProducerModule
 ProducerModule ()=default
 
template<typename... Args>
void setLastError (char const *fmt, Args &&... args)
 
void setLastError (std::string error)
 
void dispatchBuffer (Buffer buffer, bool last)
 
template<typename T >
void dispatchAudio (T &&data, int sampleRate, int channelCount, bool isLast)
 

Constructor & Destructor Documentation

◆ BufferModule() [1/2]

BufferModule::BufferModule ( )
noexcept

◆ BufferModule() [2/2]

BufferModule::BufferModule ( size_t  fireRate)
explicitnoexcept

◆ ~BufferModule()

BufferModule::~BufferModule ( )
override

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)

◆ run()

bool BufferModule::run ( )
overridevirtual
Note
Blocking call
Warning
Do not override if you do not support synchronous operations!

Reimplemented from Vsdk::Audio::ProducerModule.

◆ start()

bool BufferModule::start ( )
overridevirtual
Note
Non-blocking call
Warning
Do not override if you do not support async operations!

Reimplemented from Vsdk::Audio::ProducerModule.

◆ stop()

bool BufferModule::stop ( )
overridevirtual
Note
Non-blocking call
Warning
Do not override if you do not support async operations!

Reimplemented from Vsdk::Audio::ProducerModule.