SCons: Add enum conversion warning

This commit is contained in:
Thaddeus Crews 2025-04-26 10:05:07 -05:00
parent e37c6261ea
commit dc9c34f0c6
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
14 changed files with 67 additions and 77 deletions

View file

@ -877,7 +877,7 @@ if env.msvc and not methods.using_clang(env): # MSVC
env.AppendUnique(LINKFLAGS=["/WX"])
else: # GCC, Clang
common_warnings = []
common_warnings = ["-Wenum-conversion"]
if methods.using_gcc(env):
common_warnings += ["-Wshadow", "-Wno-misleading-indentation"]

View file

@ -78,9 +78,7 @@ public:
CURSOR_MAX
};
enum {
JOYPADS_MAX = 16,
};
static constexpr int32_t JOYPADS_MAX = 16;
typedef void (*EventDispatchFunc)(const Ref<InputEvent> &p_event);

View file

@ -1117,7 +1117,7 @@ void DynamicFontImportSettingsDialog::open_settings(const String &p_path) {
for (int i = 0; i < contours.size(); i++) {
for (int j = prev_start; j <= contours[i]; j++) {
int next_point = (j < contours[i]) ? (j + 1) : prev_start;
if ((points[j].z != TextServer::CONTOUR_CURVE_TAG_ON) || (!Math::is_equal_approx(points[j].x, points[next_point].x) && !Math::is_equal_approx(points[j].y, points[next_point].y))) {
if ((points[j].z != (real_t)TextServer::CONTOUR_CURVE_TAG_ON) || (!Math::is_equal_approx(points[j].x, points[next_point].x) && !Math::is_equal_approx(points[j].y, points[next_point].y))) {
is_pixel = false;
break;
}

View file

@ -191,7 +191,7 @@ Error ResourceImporterDynamicFont::import(ResourceUID::ID p_source_id, const Str
for (int i = 0; i < contours.size(); i++) {
for (int j = prev_start; j <= contours[i]; j++) {
int next_point = (j < contours[i]) ? (j + 1) : prev_start;
if ((points[j].z != TextServer::CONTOUR_CURVE_TAG_ON) || (!Math::is_equal_approx(points[j].x, points[next_point].x) && !Math::is_equal_approx(points[j].y, points[next_point].y))) {
if ((points[j].z != (real_t)TextServer::CONTOUR_CURVE_TAG_ON) || (!Math::is_equal_approx(points[j].x, points[next_point].x) && !Math::is_equal_approx(points[j].y, points[next_point].y))) {
is_pixel = false;
break;
}

View file

@ -3439,7 +3439,7 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) {
Vector2 line_starts[4];
Vector2 line_ends[4];
for (int i = 0; i < 4; i++) {
real_t anchor_val = (i >= 2) ? ANCHOR_END - anchors_values[i] : anchors_values[i];
real_t anchor_val = (i >= 2) ? (real_t)ANCHOR_END - anchors_values[i] : anchors_values[i];
line_starts[i] = corners_pos[i].lerp(corners_pos[(i + 1) % 4], anchor_val);
line_ends[i] = corners_pos[(i + 3) % 4].lerp(corners_pos[(i + 2) % 4], anchor_val);
bool anchor_snapped = anchors_values[i] == 0.0 || anchors_values[i] == 0.5 || anchors_values[i] == 1.0;
@ -3457,11 +3457,11 @@ void CanvasItemEditor::_draw_control_helpers(Control *control) {
_draw_percentage_at_position(percent_val, (anchors_pos[dragged_anchor] + anchors_pos[(dragged_anchor + 3) % 4]) / 2, (Side)(dragged_anchor));
percent_val = anchors_values[(dragged_anchor + 1) % 4];
percent_val = ((dragged_anchor + 1) % 4 >= 2) ? ANCHOR_END - percent_val : percent_val;
percent_val = ((dragged_anchor + 1) % 4 >= 2) ? (real_t)ANCHOR_END - percent_val : percent_val;
_draw_percentage_at_position(percent_val, (line_starts[dragged_anchor] + anchors_pos[dragged_anchor]) / 2, (Side)(dragged_anchor));
percent_val = anchors_values[dragged_anchor];
percent_val = (dragged_anchor >= 2) ? ANCHOR_END - percent_val : percent_val;
percent_val = (dragged_anchor >= 2) ? (real_t)ANCHOR_END - percent_val : percent_val;
_draw_percentage_at_position(percent_val, (line_ends[(dragged_anchor + 1) % 4] + anchors_pos[dragged_anchor]) / 2, (Side)((dragged_anchor + 1) % 4));
}

View file

@ -181,14 +181,12 @@ class Node3DEditorViewport : public Control {
};
public:
enum {
GIZMO_BASE_LAYER = 27,
GIZMO_EDIT_LAYER = 26,
GIZMO_GRID_LAYER = 25,
MISC_TOOL_LAYER = 24,
static constexpr int32_t GIZMO_BASE_LAYER = 27;
static constexpr int32_t GIZMO_EDIT_LAYER = 26;
static constexpr int32_t GIZMO_GRID_LAYER = 25;
static constexpr int32_t MISC_TOOL_LAYER = 24;
FRAME_TIME_HISTORY = 20,
};
static constexpr int32_t FRAME_TIME_HISTORY = 20;
enum NavigationScheme {
NAVIGATION_GODOT = 0,

View file

@ -39,11 +39,9 @@ public:
COMPRESS_ZSTD,
};
enum {
TOKEN_BYTE_MASK = 0x80,
TOKEN_BITS = 8,
TOKEN_MASK = (1 << (TOKEN_BITS - 1)) - 1,
};
static constexpr uint32_t TOKEN_BYTE_MASK = 0x80;
static constexpr uint32_t TOKEN_BITS = 8;
static constexpr uint32_t TOKEN_MASK = (1 << (TOKEN_BITS - 1)) - 1;
Vector<StringName> identifiers;
Vector<Variant> constants;

View file

@ -48,9 +48,7 @@ class BaseButton;
class GridMapEditor : public VBoxContainer {
GDCLASS(GridMapEditor, VBoxContainer);
enum {
GRID_CURSOR_SIZE = 50
};
static constexpr int32_t GRID_CURSOR_SIZE = 50;
enum InputAction {
INPUT_NONE,

View file

@ -1829,7 +1829,7 @@ Color DisplayServerMacOS::screen_get_pixel(const Point2i &p_position) const {
CGColorSpaceRef color_space = CGColorSpaceCreateDeviceRGB();
if (color_space) {
uint8_t img_data[4];
CGContextRef context = CGBitmapContextCreate(img_data, 1, 1, 8, 4, color_space, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
CGContextRef context = CGBitmapContextCreate(img_data, 1, 1, 8, 4, color_space, (uint32_t)kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
if (context) {
CGContextDrawImage(context, CGRectMake(0, 0, 1, 1), image);
color = Color(img_data[0] / 255.0f, img_data[1] / 255.0f, img_data[2] / 255.0f, img_data[3] / 255.0f);
@ -1878,7 +1878,7 @@ Ref<Image> DisplayServerMacOS::screen_get_image(int p_screen) const {
Vector<uint8_t> img_data;
img_data.resize(height * width * 4);
CGContextRef context = CGBitmapContextCreate(img_data.ptrw(), width, height, 8, 4 * width, color_space, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
CGContextRef context = CGBitmapContextCreate(img_data.ptrw(), width, height, 8, 4 * width, color_space, (uint32_t)kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
if (context) {
CGContextDrawImage(context, CGRectMake(0, 0, width, height), image);
img = Image::create_from_data(width, height, false, Image::FORMAT_RGBA8, img_data);
@ -1926,7 +1926,7 @@ Ref<Image> DisplayServerMacOS::screen_get_image_rect(const Rect2i &p_rect) const
Vector<uint8_t> img_data;
img_data.resize_zeroed(height * width * 4);
CGContextRef context = CGBitmapContextCreate(img_data.ptrw(), width, height, 8, 4 * width, color_space, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
CGContextRef context = CGBitmapContextCreate(img_data.ptrw(), width, height, 8, 4 * width, color_space, (uint32_t)kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big);
if (context) {
CGContextDrawImage(context, CGRectMake(0, 0, width, height), image);
img = Image::create_from_data(width, height, false, Image::FORMAT_RGBA8, img_data);

View file

@ -525,17 +525,17 @@ float JoypadWindows::axis_correct(int p_val, bool p_xinput, bool p_trigger, bool
return p_trigger ? -1.0f : 0.0f;
}
if (!p_xinput) {
return (float)p_val / MAX_JOY_AXIS;
return p_val / (float)MAX_JOY_AXIS;
}
if (p_trigger) {
// Convert to a value between -1.0f and 1.0f.
return 2.0f * p_val / MAX_TRIGGER - 1.0f;
return 2.0f * p_val / (float)MAX_TRIGGER - 1.0f;
}
float value;
if (p_val < 0) {
value = (float)p_val / MAX_JOY_AXIS;
value = p_val / (float)MAX_JOY_AXIS;
} else {
value = (float)p_val / (MAX_JOY_AXIS - 1);
value = p_val / (float)(MAX_JOY_AXIS - 1);
}
if (p_negate) {
value = -value;

View file

@ -1030,56 +1030,56 @@ int Control::_get_anchors_layout_preset() const {
float top = get_anchor(SIDE_TOP);
float bottom = get_anchor(SIDE_BOTTOM);
if (left == ANCHOR_BEGIN && right == ANCHOR_BEGIN && top == ANCHOR_BEGIN && bottom == ANCHOR_BEGIN) {
if (left == (float)ANCHOR_BEGIN && right == (float)ANCHOR_BEGIN && top == (float)ANCHOR_BEGIN && bottom == (float)ANCHOR_BEGIN) {
return (int)LayoutPreset::PRESET_TOP_LEFT;
}
if (left == ANCHOR_END && right == ANCHOR_END && top == ANCHOR_BEGIN && bottom == ANCHOR_BEGIN) {
if (left == (float)ANCHOR_END && right == (float)ANCHOR_END && top == (float)ANCHOR_BEGIN && bottom == (float)ANCHOR_BEGIN) {
return (int)LayoutPreset::PRESET_TOP_RIGHT;
}
if (left == ANCHOR_BEGIN && right == ANCHOR_BEGIN && top == ANCHOR_END && bottom == ANCHOR_END) {
if (left == (float)ANCHOR_BEGIN && right == (float)ANCHOR_BEGIN && top == (float)ANCHOR_END && bottom == (float)ANCHOR_END) {
return (int)LayoutPreset::PRESET_BOTTOM_LEFT;
}
if (left == ANCHOR_END && right == ANCHOR_END && top == ANCHOR_END && bottom == ANCHOR_END) {
if (left == (float)ANCHOR_END && right == (float)ANCHOR_END && top == (float)ANCHOR_END && bottom == (float)ANCHOR_END) {
return (int)LayoutPreset::PRESET_BOTTOM_RIGHT;
}
if (left == ANCHOR_BEGIN && right == ANCHOR_BEGIN && top == 0.5 && bottom == 0.5) {
if (left == (float)ANCHOR_BEGIN && right == (float)ANCHOR_BEGIN && top == 0.5 && bottom == 0.5) {
return (int)LayoutPreset::PRESET_CENTER_LEFT;
}
if (left == ANCHOR_END && right == ANCHOR_END && top == 0.5 && bottom == 0.5) {
if (left == (float)ANCHOR_END && right == (float)ANCHOR_END && top == 0.5 && bottom == 0.5) {
return (int)LayoutPreset::PRESET_CENTER_RIGHT;
}
if (left == 0.5 && right == 0.5 && top == ANCHOR_BEGIN && bottom == ANCHOR_BEGIN) {
if (left == 0.5 && right == 0.5 && top == (float)ANCHOR_BEGIN && bottom == (float)ANCHOR_BEGIN) {
return (int)LayoutPreset::PRESET_CENTER_TOP;
}
if (left == 0.5 && right == 0.5 && top == ANCHOR_END && bottom == ANCHOR_END) {
if (left == 0.5 && right == 0.5 && top == (float)ANCHOR_END && bottom == (float)ANCHOR_END) {
return (int)LayoutPreset::PRESET_CENTER_BOTTOM;
}
if (left == 0.5 && right == 0.5 && top == 0.5 && bottom == 0.5) {
return (int)LayoutPreset::PRESET_CENTER;
}
if (left == ANCHOR_BEGIN && right == ANCHOR_BEGIN && top == ANCHOR_BEGIN && bottom == ANCHOR_END) {
if (left == (float)ANCHOR_BEGIN && right == (float)ANCHOR_BEGIN && top == (float)ANCHOR_BEGIN && bottom == (float)ANCHOR_END) {
return (int)LayoutPreset::PRESET_LEFT_WIDE;
}
if (left == ANCHOR_END && right == ANCHOR_END && top == ANCHOR_BEGIN && bottom == ANCHOR_END) {
if (left == (float)ANCHOR_END && right == (float)ANCHOR_END && top == (float)ANCHOR_BEGIN && bottom == (float)ANCHOR_END) {
return (int)LayoutPreset::PRESET_RIGHT_WIDE;
}
if (left == ANCHOR_BEGIN && right == ANCHOR_END && top == ANCHOR_BEGIN && bottom == ANCHOR_BEGIN) {
if (left == (float)ANCHOR_BEGIN && right == (float)ANCHOR_END && top == (float)ANCHOR_BEGIN && bottom == (float)ANCHOR_BEGIN) {
return (int)LayoutPreset::PRESET_TOP_WIDE;
}
if (left == ANCHOR_BEGIN && right == ANCHOR_END && top == ANCHOR_END && bottom == ANCHOR_END) {
if (left == (float)ANCHOR_BEGIN && right == (float)ANCHOR_END && top == (float)ANCHOR_END && bottom == (float)ANCHOR_END) {
return (int)LayoutPreset::PRESET_BOTTOM_WIDE;
}
if (left == 0.5 && right == 0.5 && top == ANCHOR_BEGIN && bottom == ANCHOR_END) {
if (left == 0.5 && right == 0.5 && top == (float)ANCHOR_BEGIN && bottom == (float)ANCHOR_END) {
return (int)LayoutPreset::PRESET_VCENTER_WIDE;
}
if (left == ANCHOR_BEGIN && right == ANCHOR_END && top == 0.5 && bottom == 0.5) {
if (left == (float)ANCHOR_BEGIN && right == (float)ANCHOR_END && top == 0.5 && bottom == 0.5) {
return (int)LayoutPreset::PRESET_HCENTER_WIDE;
}
if (left == ANCHOR_BEGIN && right == ANCHOR_END && top == ANCHOR_BEGIN && bottom == ANCHOR_END) {
if (left == (float)ANCHOR_BEGIN && right == (float)ANCHOR_END && top == (float)ANCHOR_BEGIN && bottom == (float)ANCHOR_END) {
return (int)LayoutPreset::PRESET_FULL_RECT;
}

View file

@ -3078,11 +3078,11 @@ void TextMesh::_generate_glyph_mesh_data(const GlyphMeshKey &p_key, const Glyph
Vector<ContourPoint> polygon;
for (int32_t j = start; j <= end; j++) {
if (points[j].z == TextServer::CONTOUR_CURVE_TAG_ON) {
if (points[j].z == (real_t)TextServer::CONTOUR_CURVE_TAG_ON) {
// Point on the curve.
Vector2 p = Vector2(points[j].x, points[j].y) * pixel_size;
polygon.push_back(ContourPoint(p, true));
} else if (points[j].z == TextServer::CONTOUR_CURVE_TAG_OFF_CONIC) {
} else if (points[j].z == (real_t)TextServer::CONTOUR_CURVE_TAG_OFF_CONIC) {
// Conic Bezier arc.
int32_t next = (j == end) ? start : (j + 1);
int32_t prev = (j == start) ? end : (j - 1);
@ -3091,16 +3091,16 @@ void TextMesh::_generate_glyph_mesh_data(const GlyphMeshKey &p_key, const Glyph
Vector2 p2;
// For successive conic OFF points add a virtual ON point in the middle.
if (points[prev].z == TextServer::CONTOUR_CURVE_TAG_OFF_CONIC) {
if (points[prev].z == (real_t)TextServer::CONTOUR_CURVE_TAG_OFF_CONIC) {
p0 = (Vector2(points[prev].x, points[prev].y) + Vector2(points[j].x, points[j].y)) / 2.0;
} else if (points[prev].z == TextServer::CONTOUR_CURVE_TAG_ON) {
} else if (points[prev].z == (real_t)TextServer::CONTOUR_CURVE_TAG_ON) {
p0 = Vector2(points[prev].x, points[prev].y);
} else {
ERR_FAIL_MSG(vformat("Invalid conic arc point sequence at %d:%d", i, j));
}
if (points[next].z == TextServer::CONTOUR_CURVE_TAG_OFF_CONIC) {
if (points[next].z == (real_t)TextServer::CONTOUR_CURVE_TAG_OFF_CONIC) {
p2 = (Vector2(points[j].x, points[j].y) + Vector2(points[next].x, points[next].y)) / 2.0;
} else if (points[next].z == TextServer::CONTOUR_CURVE_TAG_ON) {
} else if (points[next].z == (real_t)TextServer::CONTOUR_CURVE_TAG_ON) {
p2 = Vector2(points[next].x, points[next].y);
} else {
ERR_FAIL_MSG(vformat("Invalid conic arc point sequence at %d:%d", i, j));
@ -3118,7 +3118,7 @@ void TextMesh::_generate_glyph_mesh_data(const GlyphMeshKey &p_key, const Glyph
polygon.push_back(ContourPoint(p, false));
t += step;
}
} else if (points[j].z == TextServer::CONTOUR_CURVE_TAG_OFF_CUBIC) {
} else if (points[j].z == (real_t)TextServer::CONTOUR_CURVE_TAG_OFF_CUBIC) {
// Cubic Bezier arc.
int32_t cur = j;
int32_t next1 = (j == end) ? start : (j + 1);
@ -3126,7 +3126,7 @@ void TextMesh::_generate_glyph_mesh_data(const GlyphMeshKey &p_key, const Glyph
int32_t prev = (j == start) ? end : (j - 1);
// There must be exactly two OFF points and two ON points for each cubic arc.
if (points[prev].z != TextServer::CONTOUR_CURVE_TAG_ON) {
if (points[prev].z != (real_t)TextServer::CONTOUR_CURVE_TAG_ON) {
cur = (cur == 0) ? end : cur - 1;
next1 = (next1 == 0) ? end : next1 - 1;
next2 = (next2 == 0) ? end : next2 - 1;
@ -3134,10 +3134,10 @@ void TextMesh::_generate_glyph_mesh_data(const GlyphMeshKey &p_key, const Glyph
} else {
j++;
}
ERR_FAIL_COND_MSG(points[prev].z != TextServer::CONTOUR_CURVE_TAG_ON, vformat("Invalid cubic arc point sequence at %d:%d", i, prev));
ERR_FAIL_COND_MSG(points[cur].z != TextServer::CONTOUR_CURVE_TAG_OFF_CUBIC, vformat("Invalid cubic arc point sequence at %d:%d", i, cur));
ERR_FAIL_COND_MSG(points[next1].z != TextServer::CONTOUR_CURVE_TAG_OFF_CUBIC, vformat("Invalid cubic arc point sequence at %d:%d", i, next1));
ERR_FAIL_COND_MSG(points[next2].z != TextServer::CONTOUR_CURVE_TAG_ON, vformat("Invalid cubic arc point sequence at %d:%d", i, next2));
ERR_FAIL_COND_MSG(points[prev].z != (real_t)TextServer::CONTOUR_CURVE_TAG_ON, vformat("Invalid cubic arc point sequence at %d:%d", i, prev));
ERR_FAIL_COND_MSG(points[cur].z != (real_t)TextServer::CONTOUR_CURVE_TAG_OFF_CUBIC, vformat("Invalid cubic arc point sequence at %d:%d", i, cur));
ERR_FAIL_COND_MSG(points[next1].z != (real_t)TextServer::CONTOUR_CURVE_TAG_OFF_CUBIC, vformat("Invalid cubic arc point sequence at %d:%d", i, next1));
ERR_FAIL_COND_MSG(points[next2].z != (real_t)TextServer::CONTOUR_CURVE_TAG_ON, vformat("Invalid cubic arc point sequence at %d:%d", i, next2));
Vector2 p0 = Vector2(points[prev].x, points[prev].y);
Vector2 p1 = Vector2(points[cur].x, points[cur].y);

View file

@ -978,15 +978,15 @@ enum OldArrayFormat {
OLD_ARRAY_FORMAT_INDEX = 1 << OLD_ARRAY_INDEX,
OLD_ARRAY_COMPRESS_BASE = (OLD_ARRAY_INDEX + 1),
OLD_ARRAY_COMPRESS_VERTEX = 1 << (OLD_ARRAY_VERTEX + OLD_ARRAY_COMPRESS_BASE), // mandatory
OLD_ARRAY_COMPRESS_NORMAL = 1 << (OLD_ARRAY_NORMAL + OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_TANGENT = 1 << (OLD_ARRAY_TANGENT + OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_COLOR = 1 << (OLD_ARRAY_COLOR + OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_TEX_UV = 1 << (OLD_ARRAY_TEX_UV + OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_TEX_UV2 = 1 << (OLD_ARRAY_TEX_UV2 + OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_BONES = 1 << (OLD_ARRAY_BONES + OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_WEIGHTS = 1 << (OLD_ARRAY_WEIGHTS + OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_INDEX = 1 << (OLD_ARRAY_INDEX + OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_VERTEX = 1 << (OLD_ARRAY_VERTEX + (int32_t)OLD_ARRAY_COMPRESS_BASE), // mandatory
OLD_ARRAY_COMPRESS_NORMAL = 1 << (OLD_ARRAY_NORMAL + (int32_t)OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_TANGENT = 1 << (OLD_ARRAY_TANGENT + (int32_t)OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_COLOR = 1 << (OLD_ARRAY_COLOR + (int32_t)OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_TEX_UV = 1 << (OLD_ARRAY_TEX_UV + (int32_t)OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_TEX_UV2 = 1 << (OLD_ARRAY_TEX_UV2 + (int32_t)OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_BONES = 1 << (OLD_ARRAY_BONES + (int32_t)OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_WEIGHTS = 1 << (OLD_ARRAY_WEIGHTS + (int32_t)OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_COMPRESS_INDEX = 1 << (OLD_ARRAY_INDEX + (int32_t)OLD_ARRAY_COMPRESS_BASE),
OLD_ARRAY_FLAG_USE_2D_VERTICES = OLD_ARRAY_COMPRESS_INDEX << 1,
OLD_ARRAY_FLAG_USE_16_BIT_BONES = OLD_ARRAY_COMPRESS_INDEX << 2,

View file

@ -58,16 +58,14 @@ class AudioEffectChorus : public AudioEffect {
friend class AudioEffectChorusInstance;
public:
enum {
MAX_DELAY_MS = 50,
MAX_DEPTH_MS = 20,
MAX_WIDTH_MS = 50,
MAX_VOICES = 4,
CYCLES_FRAC = 16,
CYCLES_MASK = (1 << CYCLES_FRAC) - 1,
MAX_CHANNELS = 4,
MS_CUTOFF_MAX = 16000
};
static constexpr int32_t MAX_DELAY_MS = 50;
static constexpr int32_t MAX_DEPTH_MS = 20;
static constexpr int32_t MAX_WIDTH_MS = 50;
static constexpr int32_t MAX_VOICES = 4;
static constexpr int32_t CYCLES_FRAC = 16;
static constexpr int32_t CYCLES_MASK = (1 << CYCLES_FRAC) - 1;
static constexpr int32_t MAX_CHANNELS = 4;
static constexpr int32_t MS_CUTOFF_MAX = 16000;
private:
struct Voice {