Sound Bakery  v0.1.0
Open-source audio middleware for games
Loading...
Searching...
No Matches
AudioDisplayWidget.h
1#pragma once
2
3#include "Widget.h"
4#include "sound_bakery/sound_bakery.h"
5
6namespace SB::Engine
7{
8 class Sound;
9}
10
12{
13public:
14 AudioDisplayWidget(WidgetSubsystem* parentSubsystem)
15 : Widget(parentSubsystem)
16 {
17 }
18
19 AudioDisplayWidget(Widget* parent) : Widget(parent) {}
20
21public:
22 virtual void Render() override;
23
24private:
25 bool HasCache();
26 void GenerateCache();
27
28private:
29 std::vector<std::vector<float>> m_cachedSamples;
30 int m_playPixel = 0;
31 float m_drawWidth = 0;
32 float m_previousDrawWidth = 0;
33 SB::Engine::Sound* m_previousSound;
34};
Definition AudioDisplayWidget.h:12
Definition sound.h:9
Definition WidgetSubsystem.h:7
Definition Widget.h:16