summaryrefslogtreecommitdiff
path: root/src/audiotypes.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-02-18 18:06:50 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2020-02-18 18:13:08 +0100
commitcdc96aae4393f0cba0e274efcccc95bc25c5bbdd (patch)
tree8fc773ca2549c011286cdb15c06620c500b52964 /src/audiotypes.h
parentfb992677cf62b6aa982476538faae43e5bbbd87f (diff)
Modernize audio types.
Diffstat (limited to 'src/audiotypes.h')
-rw-r--r--src/audiotypes.h13
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;