![]() |
VISR
0.11.7
Versatile Interactive Scene Renderer
|
#include <audio_interface.hpp>
Classes | |
class | Configuration |
Public Types | |
using | SampleRateType = std::size_t |
using | AudioCallback = void(*)(void *, ExternalSampleType const *const *, ExternalSampleType *const *, bool &) |
using | ExternalSampleType = float |
Preliminary definition of sample types. More... | |
using | InternalSampleType = float |
note: the internal sample type should be of no concern to the abstract interface. More... | |
Public Member Functions | |
virtual | ~AudioInterface () |
virtual std::size_t | numberOfCaptureChannels () const =0 |
virtual std::size_t | numberOfPlaybackChannels () const =0 |
virtual std::size_t | period () const =0 |
virtual std::size_t | samplingFrequency () const =0 |
virtual bool | registerCallback (AudioCallback callbackPtr, void *userData)=0 |
virtual bool | unregisterCallback (AudioCallback callbackPtr)=0 |
virtual void | start ()=0 |
virtual void | stop ()=0 |
Abstract interface for various audio interfaces.
using visr::audiointerfaces::AudioInterface::AudioCallback = void (*)( void *, ExternalSampleType const * const * , ExternalSampleType * const * , bool& ) |
The type of the callback function that can be registered to be called if sufficient data is available
Preliminary definition of sample types.
note: the internal sample type should be of no concern to the abstract interface.
using visr::audiointerfaces::AudioInterface::SampleRateType = std::size_t |
The type used to specify the sampling frequency
|
virtualdefault |
Virtual base class destructor, enable destruction of polymorphically instantiated objects
|
pure virtual |
Return the number of input channels to the interface.
Implemented in visr::audiointerfaces::PortaudioInterface, and visr::audiointerfaces::JackInterface.
|
pure virtual |
Return the number of output channels to the interface.
Implemented in visr::audiointerfaces::PortaudioInterface, and visr::audiointerfaces::JackInterface.
|
pure virtual |
Return the configured period (block size).
Implemented in visr::audiointerfaces::PortaudioInterface, and visr::audiointerfaces::JackInterface.
|
pure virtual |
Implemented in visr::audiointerfaces::PortaudioInterface, and visr::audiointerfaces::JackInterface.
|
pure virtual |
Return the configured sampling frequency (in Hz)
Implemented in visr::audiointerfaces::PortaudioInterface, and visr::audiointerfaces::JackInterface.
|
pure virtual |
Start the audio interface, i.e., reacting to callbacks and passing them to the registered callback handlers. Pure virtual method, must be implemented in all concrete derived classes.
Implemented in visr::audiointerfaces::PortaudioInterface, and visr::audiointerfaces::JackInterface.
|
pure virtual |
Stop the audio interface, i.e., calling the registered callback functions anymore. Pure virtual method, must be implemented in all concrete derived classes.
Implemented in visr::audiointerfaces::PortaudioInterface, and visr::audiointerfaces::JackInterface.
|
pure virtual |
Implemented in visr::audiointerfaces::PortaudioInterface, and visr::audiointerfaces::JackInterface.