Functions

sp::tool::AudioPCMPlotter Namespace Reference

Namespace for audio PCM raw data plotter. More...

Functions

SP_EXPORT bool plotAudioBuffer (const audio::SAudioBuffer &AudioBuffer, const dim::rect2di &Rect, const video::color &Color, f32 RangeFrom, f32 RangeTo)

Detailed Description

Namespace for audio PCM raw data plotter.


Function Documentation

SP_EXPORT bool sp::tool::AudioPCMPlotter::plotAudioBuffer ( const audio::SAudioBuffer &  AudioBuffer,
const dim::rect2di &  Rect,
const video::color &  Color,
f32  RangeFrom = 0.0f,
f32  RangeTo = 1.0f 
)

Plots the given audio PCM raw buffer into the frame buffer. If you want to render it into a texture, just set a render target.

Parameters:
[in] AudioBuffer Specifies the raw audio buffer. You can load these buffers with the "loadAudioPCMBuffer" function of the "audio::SoundDevice" class.
[in] Rect Specifies the rectangle where the output is to be plot.
[in] Color Specifies the drawing color.
[in] RangeFrom Specifies the plotting range start. By default 0.0.
[in] RangeTo Specifies the plotting range end. By default 1.0.
Note:
'RangeFrom' must be greater than 'RangeTo'.
Returns:
True on success. Otherwise the audio buffer is corrupted or the rectangle has a negative size.
See also:
audio::SoundDevice::loadAudioPCMBuffer
audio::SAudioBuffer
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines