mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 11:38:12 +00:00
Persist audio (#1110)
* Add credits * Persist audio, add volume to apps * Remove comment * Hack around apparent alignment problem
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#define __VOLUME_H__
|
||||
|
||||
#include <cstdint>
|
||||
#include "utility.hpp"
|
||||
|
||||
class volume_t {
|
||||
public:
|
||||
@@ -89,13 +90,7 @@ struct volume_range_t {
|
||||
volume_t max;
|
||||
|
||||
volume_t limit(const volume_t value) const {
|
||||
if (value < min) {
|
||||
return min;
|
||||
}
|
||||
if (value > max) {
|
||||
return max;
|
||||
}
|
||||
return value;
|
||||
return clip(value, min, max);
|
||||
}
|
||||
|
||||
volume_t normalize(const volume_t value) const {
|
||||
|
Reference in New Issue
Block a user