Klang C++
Language Reference (draft)
Loading...
Searching...
No Matches
klang::Bank< TYPE, COUNT >

A parallel bank of multiple audio objects. More...

#include <klang.h>

+ Inheritance diagram for klang::Bank< TYPE, COUNT >:

Public Member Functions

TYPE & operator[] (int index)
 
const TYPE & operator[] (int index) const
 
template<typename... Args>
void set (Args... args)
 
void input () override
 
void process () override
 

Public Attributes

TYPE items [COUNT]
 

Detailed Description

template<typename TYPE, int COUNT>
struct klang::Bank< TYPE, COUNT >

Definition at line 2000 of file klang.h.

Member Function Documentation

◆ input()

template<typename TYPE , int COUNT>
void klang::Bank< TYPE, COUNT >::input ( )
inlineoverride

Definition at line 2015 of file klang.h.

2015 {
2016 for (int n = 0; n < COUNT; n++)
2017 in[n] >> items[n];
2018 }
TYPE items[COUNT]
Definition klang.h:2004

◆ operator[]() [1/2]

template<typename TYPE , int COUNT>
TYPE & klang::Bank< TYPE, COUNT >::operator[] ( int index)
inline

Definition at line 2006 of file klang.h.

2006{ return items[index]; }

◆ operator[]() [2/2]

template<typename TYPE , int COUNT>
const TYPE & klang::Bank< TYPE, COUNT >::operator[] ( int index) const
inline

Definition at line 2007 of file klang.h.

2007{ return items[index]; }

◆ process()

template<typename TYPE , int COUNT>
void klang::Bank< TYPE, COUNT >::process ( )
inlineoverride

Definition at line 2020 of file klang.h.

2020 {
2021 for (int n = 0; n < COUNT; n++)
2022 items[n] >> out[n];
2023 }

◆ set()

template<typename TYPE , int COUNT>
template<typename... Args>
void klang::Bank< TYPE, COUNT >::set ( Args... args)
inline

Definition at line 2010 of file klang.h.

2010 {
2011 for (int n = 0; n < COUNT; n++)
2012 items[n].set(args...);
2013 }
void set(Args... args)
Definition klang.h:2010

Member Data Documentation

◆ items

template<typename TYPE , int COUNT>
TYPE klang::Bank< TYPE, COUNT >::items[COUNT]

Definition at line 2004 of file klang.h.