diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-02-18 18:06:50 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-02-18 18:13:08 +0100 |
commit | cdc96aae4393f0cba0e274efcccc95bc25c5bbdd (patch) | |
tree | 8fc773ca2549c011286cdb15c06620c500b52964 /src | |
parent | fb992677cf62b6aa982476538faae43e5bbbd87f (diff) |
Modernize audio types.
Diffstat (limited to 'src')
-rw-r--r-- | src/audiotypes.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/audiotypes.h b/src/audiotypes.h index 5add8cd..eca2480 100644 --- a/src/audiotypes.h +++ b/src/audiotypes.h @@ -26,10 +26,13 @@ */ #pragma once -//typedef signed short int sample_t; -typedef float sample_t; +#include <cstdint> -typedef unsigned int channels_t; -typedef unsigned int channel_t; +//! Type used for storing a single audio sample +using sample_t = float; -typedef float level_t; +//! Type used for representing a channel (index) +using channel_t = std::uint16_t; + +//! Type for storing a engine-level (ie. midi velocity in engine land) +using level_t = float; |