Bela
Real-time, ultra-low-latency audio and sensor processing system for BeagleBone Black
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
BelaDebounce.h
1 #pragma once
2 #include <Bela.h>
3 #include <libraries/Debounce/Debounce.h>
4 
9 class BelaDebounce : public Debounce
10 {
11 public:
12  struct Settings{
14  unsigned int channel;
15  double debounceMs;
16  };
17  BelaDebounce();
21  BelaDebounce(const Settings& settings);
27  int setup(const Settings& settings);
34  bool process(BelaContext* context);
41  bool process(BelaContext* context, unsigned int frame);
42  using Debounce::process;
43 private:
44  unsigned int channel;
45 };
Definition: BelaDebounce.h:12
double debounceMs
Debounce time in milliseconds.
Definition: BelaDebounce.h:15
Definition: BelaDebounce.h:9
unsigned int channel
Bela digital in channels to which the switch is connected.
Definition: BelaDebounce.h:14
Debounce a boolean reading.
Definition: Debounce.h:10
Structure holding audio and sensor settings and pointers to I/O data buffers.
Definition: Bela.h:231
int setup(const Settings &settings)
Definition: BelaDebounce.cpp:11
bool process(BelaContext *context)
Definition: BelaDebounce.cpp:23
BelaContext * context
BelaContext.
Definition: BelaDebounce.h:13
bool process(bool input)
Definition: Debounce.h:57
Main Bela public API.