hx3d
1
2D/3D Simple Game Framework
|
Audio waveform displaying. More...
#include <waveform.hpp>
Public Member Functions | |
Waveform () | |
Create an empty waveform with a refresh delay of 50. More... | |
Waveform (const int refreshDelay) | |
Create an empty waveform with a custom refresh delay. More... | |
virtual void | update (const Sint16 *stream, const int length, const float delta) override |
Update the display. More... | |
![]() | |
Display () | |
Create an empty display with a refresh delay of 50. More... | |
Display (const int refreshDelay) | |
Create an empty display with a custom refresh delay. More... | |
void | initialize (const unsigned int width, const unsigned int height) |
Initialize the display. More... | |
void | setRefreshDelay (const int refreshDelay) |
Set the refresh delay. More... | |
virtual void | onInitialization () |
Use this to execute code after initialization. More... | |
![]() | |
Sprite () | |
Create a sprite without texture. More... | |
void | setTexture (const Ptr< Texture > &texture) |
Set the sprite texture. More... | |
void | setTexture (Framebuffer &buffer) |
Set the sprite texture from a framebuffer color buffer. More... | |
void | setTexture (TextureRegion ®ion) |
Set the sprite texture from a texture region. More... | |
Ptr< Texture > | getTexture () |
Get the sprite texture. More... | |
void | scaleTexture () |
Scale the texture coordinates following the texture size. | |
virtual void | draw (Ptr< Shader > shader) override |
Draw the mesh using a shader. More... | |
![]() | |
void | setTint (Color tint) |
Set the mesh tint. More... | |
Color & | getTint () |
Get the mesh tint. More... | |
void | updateColor () |
Update the mesh color from the tint. | |
void | setGeometry (Ptr< geom::BaseGeometry > geometry) |
Set the mesh geometry. More... | |
Ptr< geom::BaseGeometry > & | getGeometry () |
Get the mesh geometry. More... | |
Additional Inherited Members | |
![]() | |
Transform | transform |
Mesh transformation. | |
![]() | |
void | drawBorders () |
Draw white borders. | |
![]() | |
graphics::Image | _image |
Drawing image. | |
Timer | _timer |
Refresh timer. | |
int | _refreshDelay |
Refresh delay. | |
bool | _initialized |
Is the display initialized ? | |
![]() | |
Color | _tint |
Tint color. | |
Ptr< geom::BaseGeometry > | _geometry |
Current geometry. | |
Audio waveform displaying.
Example code
Definition at line 60 of file waveform.hpp.
hx3d::audio::Waveform::Waveform | ( | ) |
Create an empty waveform with a refresh delay of 50.
Definition at line 29 of file waveform.cpp.
hx3d::audio::Waveform::Waveform | ( | const int | refreshDelay | ) |
Create an empty waveform with a custom refresh delay.
refreshDelay | Refresh delay |
Definition at line 30 of file waveform.cpp.
|
overridevirtual |
Update the display.
stream | Stream of amplitudes (between -32767 and 32767) |
length | Length of the stream |
delta | Delta time |
Implements hx3d::audio::Display.
Definition at line 33 of file waveform.cpp.