diff options
Diffstat (limited to 'rotord/rotor.h')
| -rwxr-xr-x | rotord/rotor.h | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/rotord/rotor.h b/rotord/rotor.h index c08371d..132059f 100755 --- a/rotord/rotor.h +++ b/rotord/rotor.h @@ -335,17 +335,38 @@ namespace Rotor { }; class base_audio_processor { public: - base_audio_processor(); - base_audio_processor(int _channels,int _bits); - virtual bool process_chunk(char *data,int num_samples); - void init(int _channels,int _bits) { + virtual bool process_frame(uint8_t *data,int samples)=0; + void init(int _channels,int _bits,int _samples) { channels=_channels; bits=_bits; + samples=_samples; }; - int channels,bits; + int channels,bits,samples; }; class audio_thumbnailer: public base_audio_processor { + //how to deal with the fact that frames don't correspond with pixels? + //buffer the data somehow + //draw pixels based on rms value public: + audio_thumbnailer(){ + height=64; + width=512; + data=new uint8_t[height*width]; + memset(data,0,height*width); + } + ~audio_thumbnailer(){ + delete[] data; + } + void init(int _channels,int _bits,int _samples) { + base_audio_processor::init(_channels,_bits,_samples); + samples_per_column=samples/width(); + } + bool process_frame(uint8_t *data,int samples){ + + return true; + } + uint8_t *data; + int height,width,samples_per_column; }; class Render_context: public Poco::Task { //Poco task object //manages a 'patchbay' |
