Skip to content

Commit cefb1ba

Browse files
committed
int24 cleanup
1 parent 972bda8 commit cefb1ba

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/AudioBasic/Int24x.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,15 @@ class int24x_t {
3535
set(in);
3636
}
3737

38-
#if defined(STM32) || defined(ESP32C3)
38+
int24x_t(const int64_t &in) {
39+
set(in);
40+
}
41+
42+
int24x_t(const float in) {
43+
set((int32_t)in);
44+
}
45+
46+
#if defined(USE_INT24_FROM_INT)
3947

4048
int24x_t(const int &in) {
4149
set(in);

src/AudioConfig.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,7 @@ using WiFiServerSecure = BearSSL::WiFiServerSecure;
649649
# define USE_STREAM_WRITE_OVERRIDE
650650
# define USE_STREAM_READ_OVERRIDE
651651
# define USE_STREAM_READCHAR_OVERRIDE
652+
# define USE_3BYTE_INT24
652653
typedef WiFiClient WiFiClientSecure;
653654
#endif
654655

@@ -686,7 +687,7 @@ typedef WiFiClient WiFiClientSecure;
686687
// select int24 implementation
687688
#ifdef USE_3BYTE_INT24
688689
# include "AudioBasic/Int24x.h"
689-
using int24_t = int24x_t;
690+
using int24_t = audio_tools::int24x_t;
690691
#else
691692
# include "AudioBasic/Int24.h"
692693
#endif

0 commit comments

Comments
 (0)