Skip to content

Commit

Permalink
actually fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
phandasm committed Feb 26, 2022
1 parent 10b6692 commit 31dd11a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,7 @@ void WAVSource::render_curve([[maybe_unused]] gs_effect_t *effect)
gs_draw((m_render_mode != RenderMode::LINE) ? GS_TRISTRIP : GS_LINESTRIP, 0, (uint32_t)num_verts);
}

gs_load_vertexbuffer(nullptr);
gs_vertexbuffer_destroy(vbuf);
gs_technique_end_pass(tech);
gs_technique_end(tech);
Expand Down Expand Up @@ -916,6 +917,7 @@ void WAVSource::render_bars([[maybe_unused]] gs_effect_t *effect)
gs_draw(GS_TRIS, 0, vertpos);
}

gs_load_vertexbuffer(nullptr);
gs_vertexbuffer_destroy(vbuf);
gs_technique_end_pass(tech);
gs_technique_end(tech);
Expand Down
6 changes: 3 additions & 3 deletions src/source.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ class WAVSource

void init_interp(unsigned int sz);

void render_curve(gs_effect_t *effect);
void render_bars(gs_effect_t *effect);

// constants
static const float DB_MIN;
static constexpr auto RETRY_DELAY = 2.0f;
Expand Down Expand Up @@ -188,9 +191,6 @@ class WAVSource
virtual void tick(float seconds) = 0;
virtual void render(gs_effect_t *effect);

void render_curve(gs_effect_t *effect);
void render_bars(gs_effect_t *effect);

void show();
void hide();

Expand Down

0 comments on commit 31dd11a

Please sign in to comment.