#include <SampleView.h>
Inheritance diagram for SampleView
Public Methods | |
SampleView () | |
void | SetStereo (bool stereo) |
void | Draw (Iterator begin, Iterator end, float zoom = 1.0f, int offset=0) |
void | Resize (int cx, int cy) |
void | SetWidth (float width) |
float | GetWidth () const |
SampleView (bool LogY=false) | |
void | SetStereo (bool stereo) |
void | Draw (Iterator begin, Iterator end) |
void | Draw (Iterator begin1, Iterator end1, Iterator begin2, Iterator end2) |
void | DrawLoopPoint (float x, long length) |
void | Resize (int cx, int cy) |
void | SetLogY (bool on=true) |
void | SetSelection (Iterator begin, Iterator end) |
void | SetWidth (float width) |
float | GetWidth () const |
It would be nice to be able to modify this class so that it could be used as a filter. This would enable the development of an oscilloscope. However first I need to modify my mixing functions so that filters can be put in place.
To be a filter we simply need to implement "T operator() (const T& x)" We will need to have someway of knowing where we are in the position. and how much data we need to display.
When implementing as a filter we have to take into account the the requests to update the display and the requests to filter are independent. To get around this problem perhaps we should simply store the graph somewhere so that we can update the display anytime and when we need to filter simply modify the image. We probably should have sets of images so that one can be used to display while the other is being updated.
The alternative may be to use a circular buffer. When the filter function is called simply output a new value to the last position of the buffer and update the pointers that point to the first and last position
Iterator must be able to "stride" and be able to return the distance between begin and end.