mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-09 07:02:26 -04:00
Persist audio (#1110)
* Add credits * Persist audio, add volume to apps * Remove comment * Hack around apparent alignment problem
This commit is contained in:
parent
9c39061590
commit
af448cf444
15 changed files with 46 additions and 49 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue