compile warn fix
This commit is contained in:
parent
11fabe1f29
commit
0e7b5925d2
25
main.cpp
25
main.cpp
@ -151,21 +151,6 @@ void drawToggle(SDL_Renderer* renderer, int x, int y, int size, bool active) {
|
||||
SDL_RenderDrawLine(renderer, m_x + m_w, m_y, m_x + m_w, m_y + m_h); // Right leg
|
||||
}
|
||||
|
||||
void drawSlider(SDL_Renderer* renderer, int x, int y, int w, int h, float val, const char* label) {
|
||||
// Track
|
||||
SDL_SetRenderDrawColor(renderer, 80, 80, 80, 255);
|
||||
SDL_Rect track = {x + w/2 - 2, y, 4, h};
|
||||
SDL_RenderFillRect(renderer, &track);
|
||||
|
||||
// Handle
|
||||
int handleH = 10;
|
||||
int handleY = y + h - (int)(val * h) - handleH/2;
|
||||
SDL_SetRenderDrawColor(renderer, 200, 200, 200, 255);
|
||||
SDL_Rect handle = {x, handleY, w, handleH};
|
||||
SDL_RenderFillRect(renderer, &handle);
|
||||
SDL_RenderDrawRect(renderer, &handle);
|
||||
}
|
||||
|
||||
// --- Simple Vector Font ---
|
||||
void drawChar(SDL_Renderer* renderer, int x, int y, int size, char c) {
|
||||
int w = size * 0.6;
|
||||
@ -894,7 +879,6 @@ void loadPreset(int preset) {
|
||||
engine.grid[x+3][y].param = (ratio > 1.0f) ? 0.5f : 0.0f;
|
||||
};
|
||||
|
||||
int sinkX = SynthEngine::GRID_W / 2;
|
||||
int sinkY = SynthEngine::GRID_H - 1;
|
||||
|
||||
if (preset == 1) {
|
||||
@ -1183,15 +1167,6 @@ int main(int argc, char* argv[]) {
|
||||
engine.setVolume(knob_vol_val);
|
||||
}
|
||||
}
|
||||
} else if (e.type == SDL_MOUSEMOTION) {
|
||||
if (e.motion.state & SDL_BUTTON_LMASK) {
|
||||
int mouseX = e.motion.x;
|
||||
int mouseY = e.motion.y;
|
||||
|
||||
if (mouseX >= GRID_PANEL_WIDTH) {
|
||||
int synthX = mouseX - GRID_PANEL_WIDTH;
|
||||
}
|
||||
}
|
||||
} else if (e.type == SDL_KEYDOWN) {
|
||||
if (e.key.repeat == 0) { // Ignore key repeats
|
||||
if (e.key.keysym.scancode == SDL_SCANCODE_INSERT) {
|
||||
|
||||
@ -19,13 +19,13 @@ void fill_sine_table() {
|
||||
}
|
||||
|
||||
SynthEngine::SynthEngine(uint32_t sampleRate)
|
||||
: _sampleRate(sampleRate),
|
||||
: grid{},
|
||||
_sampleRate(sampleRate),
|
||||
_phase(0),
|
||||
_increment(0),
|
||||
_volume(0.5f),
|
||||
_waveform(SAWTOOTH),
|
||||
_isGateOpen(false),
|
||||
grid{},
|
||||
_rngState(12345)
|
||||
{
|
||||
fill_sine_table();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user