Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
Loading...
Searching...
No Matches
sbl::transport Namespace Reference

The signal transport trait: a component's declared ports and the check of a processing call against them. More...

Detailed Description

The signal transport trait: a component's declared ports and the check of a processing call against them.

Classes

struct  is_processor
 
struct  is_processor< T, std::void_t< decltype(std::declval< T & >().process(std::declval< const float * >(), std::declval< float * >(), std::declval< uint16_t >()))> >
 
struct  is_source
 
struct  is_source< T, std::void_t< decltype(std::declval< T & >().process(std::declval< float * >(), std::declval< uint16_t >()))> >
 
struct  Omitted
 
struct  Parameter
 
struct  parameter_count
 
struct  parameter_count< T, std::void_t< decltype(T::PARAMETERS)> >
 
struct  Port
 
struct  port_count
 
struct  port_count< T, std::void_t< decltype(T::PORTS)> >
 

Enumerations

enum class  Spelling : uint8_t { Either , Scalar , Block }
 
enum class  Unit : uint8_t { Number , CyclesPerFrame }
 

Functions

template<std::size_t I, class... A>
constexpr auto arg (A... args)
 

Variables

template<class A >
constexpr bool is_block_v
 
template<class A >
constexpr bool is_scalar_v = std::is_arithmetic_v<std::decay_t<A>>
 
template<class A >
constexpr bool is_omitted_v = std::is_same_v<std::decay_t<A>, Omitted>
 
template<class T >
constexpr std::size_t port_count_v = port_count<T>::value
 
template<class T >
constexpr std::size_t parameter_count_v = parameter_count<T>::value
 
template<class T , class... A>
constexpr bool fits_v = detail::fits<T, A...>(std::index_sequence_for<A...>{})
 
template<class T >
constexpr bool is_source_v = is_source<T>::value
 
template<class T >
constexpr bool is_processor_v = is_processor<T>::value
 

Enumeration Type Documentation

◆ Spelling

enum class sbl::transport::Spelling : uint8_t
strong

Which spellings a port accepts (section 7.2).

Enumerator
Either 

a block or a scalar

Scalar 

a scalar only

Block 

a block only

Definition at line 44 of file transport.hpp.

◆ Unit

enum class sbl::transport::Unit : uint8_t
strong

What a port's or a parameter's value is, so a tool can convert to it.

Enumerator
Number 

used as given

CyclesPerFrame 

a frequency; a tool takes it in Hz and divides by its sample rate

Definition at line 51 of file transport.hpp.

Function Documentation

◆ arg()

template<std::size_t I, class... A>
constexpr auto sbl::transport::arg ( A...  args)
constexpr

The I-th port argument, or Omitted when the call left it off.

Definition at line 125 of file transport.hpp.

Variable Documentation

◆ is_block_v

template<class A >
constexpr bool sbl::transport::is_block_v
inlineconstexpr
Initial value:
=
std::is_same_v<std::decay_t<A>, const float*> || std::is_same_v<std::decay_t<A>, float*>

Definition at line 75 of file transport.hpp.

◆ is_scalar_v

template<class A >
constexpr bool sbl::transport::is_scalar_v = std::is_arithmetic_v<std::decay_t<A>>
inlineconstexpr

Definition at line 79 of file transport.hpp.

◆ is_omitted_v

template<class A >
constexpr bool sbl::transport::is_omitted_v = std::is_same_v<std::decay_t<A>, Omitted>
inlineconstexpr

Definition at line 82 of file transport.hpp.

◆ port_count_v

template<class T >
constexpr std::size_t sbl::transport::port_count_v = port_count<T>::value
inlineconstexpr

Definition at line 90 of file transport.hpp.

◆ parameter_count_v

template<class T >
constexpr std::size_t sbl::transport::parameter_count_v = parameter_count<T>::value
inlineconstexpr

Definition at line 99 of file transport.hpp.

◆ fits_v

template<class T , class... A>
constexpr bool sbl::transport::fits_v = detail::fits<T, A...>(std::index_sequence_for<A...>{})
inlineconstexpr

◆ is_source_v

template<class T >
constexpr bool sbl::transport::is_source_v = is_source<T>::value
inlineconstexpr

Definition at line 140 of file transport.hpp.

◆ is_processor_v

template<class T >
constexpr bool sbl::transport::is_processor_v = is_processor<T>::value
inlineconstexpr

Definition at line 150 of file transport.hpp.