This class implements a circular buffer to store min and max values of anaudio signal.
More...
#include <OutlineBuffer.h>
|
| | OutlineBuffer () |
| |
| void | setSize (const int numChannels, const int numBlocks) |
| |
| void | setSamplesPerBlock (const int numSamples) |
| |
| void | pushBlock (const juce::AudioBuffer< float > &buffer, const int numSamples) |
| | Push a block of audio samples into the outline buffer.
|
| |
| void | getChannelOutline (juce::Path &path, const juce::Rectangle< float > bounds, const int channel, const int numSamples) const |
| | Returns the outline of a specific channel inside the bounds.
|
| |
| void | getChannelOutline (juce::Path &path, const juce::Rectangle< float > bounds, const int numSamples) const |
| | This returns the outlines of each channel, splitting the bounds into equal sized rows.
|
| |
This class implements a circular buffer to store min and max values of anaudio signal.
The block size can be specified. At any time the UI can request an outline of the last n blocks as Path to fill or stroke
◆ OutlineBuffer()
◆ setSize()
| void setSize |
( |
const int |
numChannels, |
|
|
const int |
numBlocks |
|
) |
| |
- Parameters
-
| numChannels | is the number of channels the buffer will store |
| numBlocks | is the number of values the buffer will store. Allow a little safety buffer, so you don't write into the part, where it is currently read |
◆ setSamplesPerBlock()
| void setSamplesPerBlock |
( |
const int |
numSamples | ) |
|
- Parameters
-
| numSamples | sets the size of each analysed block |
◆ pushBlock()
| void pushBlock |
( |
const juce::AudioBuffer< float > & |
buffer, |
|
|
const int |
numSamples |
|
) |
| |
Push a block of audio samples into the outline buffer.
◆ getChannelOutline() [1/2]
| void getChannelOutline |
( |
juce::Path & |
path, |
|
|
const juce::Rectangle< float > |
bounds, |
|
|
const int |
channel, |
|
|
const int |
numSamples |
|
) |
| const |
Returns the outline of a specific channel inside the bounds.
- Parameters
-
| path | is a Path to be populated |
| bounds | the rectangle to paint within. The result is not clipped, if samples are exceeding 1.0, it may paint outside |
| channel | the index of the channel to paint |
| numSamples | is the number of sample blocks |
- Returns
- a path with a single channel outline (min to max)
Referenced by OutlineBuffer::getChannelOutline().
◆ getChannelOutline() [2/2]
| void getChannelOutline |
( |
juce::Path & |
path, |
|
|
const juce::Rectangle< float > |
bounds, |
|
|
const int |
numSamples |
|
) |
| const |
This returns the outlines of each channel, splitting the bounds into equal sized rows.
- Parameters
-
| path | is a Path to be populated |
| bounds | the rectangle to paint within. The result is not clipped, if samples are exceeding 1.0, it may paint outside |
| numSamples | is the number of sample blocks |
- Returns
- a path with a single channel outline (min to max)
References OutlineBuffer::getChannelOutline().
The documentation for this class was generated from the following file: