Lamp-Da 0.1
A compact lantern project
Loading...
Searching...
No Matches
Classes | Namespaces | Functions | Variables
sound.h File Reference

Interface for the physical components of the microphone. More...

Go to the source code of this file.

Classes

struct  lampda::physical::microphone::SoundStruct
 Handle the analysis of a sound sample. This structure handled the FastFourrier analysis of a sound sample, sound strenght, sound most active frequency, ... More...
 

Namespaces

namespace  lampda
 Program scope.
 
namespace  lampda::physical
 Handle the physical modules drivers.
 
namespace  lampda::physical::microphone
 Handle the microphone physical interface.
 

Functions

bool lampda::physical::microphone::enable ()
 Start the microphone data analysis, if not already started.
 
void lampda::physical::microphone::disable ()
 Disable the microphone data analysis, if its running.
 
void lampda::physical::microphone::disable_after_non_use ()
 disable microphone if last used a target time ago
 
SoundStruct & lampda::physical::microphone::get_sound_characteristics ()
 Compute and process sound data.
 

Variables

constexpr float lampda::physical::microphone::silenceLevelDb = 30.0
 Decibel level for a silent room.
 
constexpr float lampda::physical::microphone::highLevelDb = 80.0
 Microphone is not good enough at after this.
 
constexpr float lampda::physical::microphone::desiredoutput = 0.5f
 Desired output of the auto gain (0-1)
 
constexpr int16_t lampda::physical::microphone::gainedSignalTarget = INT16_MAX * desiredoutput
 Desired output of the auto gain (0-INT16_MAX)
 

Detailed Description

Interface for the physical components of the microphone.