From 422d8b81b61bb4b261a36b4b7e3877f73fb5bef3 Mon Sep 17 00:00:00 2001 From: Giulio Moro Date: Fri, 2 Feb 2024 22:53:40 +0000 Subject: [PATCH] Use fixed-width integer types for MY_TYPE in examples for clarity and future compatibility --- tests/duplex.cpp | 4 ++-- tests/playraw.cpp | 6 +++--- tests/playsaw.cpp | 4 ++-- tests/record.cpp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/duplex.cpp b/tests/duplex.cpp index 24609f88..1d680b0b 100644 --- a/tests/duplex.cpp +++ b/tests/duplex.cpp @@ -14,11 +14,11 @@ #include /* -typedef char MY_TYPE; +typedef int8_t MY_TYPE; #define FORMAT RTAUDIO_SINT8 */ -typedef signed short MY_TYPE; +typedef int16_t MY_TYPE; #define FORMAT RTAUDIO_SINT16 /* diff --git a/tests/playraw.cpp b/tests/playraw.cpp index 8a15a960..7f6ccc9b 100644 --- a/tests/playraw.cpp +++ b/tests/playraw.cpp @@ -16,12 +16,12 @@ #include /* -typedef char MY_TYPE; +typedef int8_t MY_TYPE; #define FORMAT RTAUDIO_SINT8 #define SCALE 127.0 */ -typedef signed short MY_TYPE; +typedef int16_t MY_TYPE; #define FORMAT RTAUDIO_SINT16 #define SCALE 32767.0 @@ -30,7 +30,7 @@ typedef S24 MY_TYPE; #define FORMAT RTAUDIO_SINT24 #define SCALE 8388607.0 -typedef signed int MY_TYPE; +typedef int32_t MY_TYPE; #define FORMAT RTAUDIO_SINT32 #define SCALE 2147483647.0 diff --git a/tests/playsaw.cpp b/tests/playsaw.cpp index ddef6689..ee61f064 100644 --- a/tests/playsaw.cpp +++ b/tests/playsaw.cpp @@ -14,12 +14,12 @@ #include /* -typedef char MY_TYPE; +typedef int8_t MY_TYPE; #define FORMAT RTAUDIO_SINT8 #define SCALE 127.0 */ -typedef signed short MY_TYPE; +typedef int16_t MY_TYPE; #define FORMAT RTAUDIO_SINT16 #define SCALE 32767.0 diff --git a/tests/record.cpp b/tests/record.cpp index 5bd56186..06d398c9 100644 --- a/tests/record.cpp +++ b/tests/record.cpp @@ -16,11 +16,11 @@ #include /* -typedef char MY_TYPE; +typedef int8_t MY_TYPE; #define FORMAT RTAUDIO_SINT8 */ -typedef signed short MY_TYPE; +typedef int16_t MY_TYPE; #define FORMAT RTAUDIO_SINT16 /*