From cdc96aae4393f0cba0e274efcccc95bc25c5bbdd Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 18 Feb 2020 18:06:50 +0100 Subject: Modernize audio types. --- src/audiotypes.h | 13 ++++++++----- 1 file 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 -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; -- cgit v1.2.3