Browse Source

Make dsp::int24_t compile on Windows GCC.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
ee5c998ed7
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      include/dsp/convert.hpp

+ 3
- 2
include/dsp/convert.hpp View File

@@ -8,11 +8,12 @@ namespace dsp {


/** 24-bit integer, using int32_t for conversions. */
struct __attribute__((packed)) int24_t {
struct int24_t {
int32_t i : 24;
int24_t() {}
int24_t(int32_t i) : i(i) {}
operator int32_t() {return i;}
};
} __attribute__((packed, aligned(1), gcc_struct));
static_assert(sizeof(int24_t) == 3, "int24_t type must be 3 bytes");




Loading…
Cancel
Save