Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
Loading...
Searching...
No Matches
BelaDebounce Class Reference

#include <BelaDebounce.h>

Inheritance diagram for BelaDebounce:
Debounce

Classes

struct  Settings

Public Member Functions

 BelaDebounce (const Settings &settings)
int setup (const Settings &settings)
bool process (BelaContext *context)
bool process (BelaContext *context, unsigned int frame)
bool process (bool input)
Public Member Functions inherited from Debounce
 Debounce (unsigned int interval)
 Debounce (const Settings &settings)
void setup (unsigned int interval)
void setup (const Settings &settings)
bool process (bool input)
bool get ()
Edge edgeDetected ()

Additional Inherited Members

Public Types inherited from Debounce
enum  Edge { FALLING = -1 , NONE = 0 , RISING = 1 }
Static Public Member Functions inherited from Debounce
static Edge detectEdge (bool oldState, bool newState)
Protected Attributes inherited from Debounce
bool state
bool oldState

Detailed Description

A debounced reading from a Bela digital in.

Constructor & Destructor Documentation

◆ BelaDebounce()

BelaDebounce::BelaDebounce ( const Settings & settings)

Same as setup(), but throws on error.

Member Function Documentation

◆ setup()

int BelaDebounce::setup ( const Settings & settings)

Set up the switch.

Returns
0 on success or an error code otherwise.

◆ process() [1/3]

bool BelaDebounce::process ( BelaContext * context)

Process the current block of data. Call this once per block.

Returns
the debounced value of the switch at the end of the block.

◆ process() [2/3]

bool BelaDebounce::process ( BelaContext * context,
unsigned int frame )

Process the current frame of data. Call this every frame.

Returns
the debounced value of the switch.

◆ process() [3/3]

bool Debounce::process ( bool input)
inline

Process an input through the debouncer and obtain an output.


The documentation for this class was generated from the following files: