Sound Bakery  v0.1.0
Open-source audio middleware for games
Loading...
Searching...
No Matches
audio_display_widget.h
1#pragma once
2
3#include "gluten/widgets/widget.h"
4#include "sound_bakery/sound_bakery.h"
5
6namespace sbk::engine
7{
8 class sound;
9}
10
11class audio_display_widget : public gluten::widget
12{
13public:
14 audio_display_widget(gluten::widget_subsystem* parentSubsystem) : widget(parentSubsystem) {}
15
16 audio_display_widget(widget* parent) : widget(parent) {}
17
18public:
19 virtual void render() override;
20
21private:
22 bool has_cache();
23 void generate_cache();
24
25private:
26 std::vector<std::vector<float>> m_cachedSamples;
27 int m_playPixel = 0;
28 float m_drawWidth = 0;
29 float m_previousDrawWidth = 0;
30 sbk::engine::sound* m_previousSound;
31};
Definition audio_display_widget.h:12
Definition sound.h:20