spek

Acoustic spectrum analyser https://github.com/alexkay/spek spek.cc
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

spek-events.h (882B)


      1 #pragma once
      2 
      3 #include <wx/wx.h>
      4 
      5 class SpekHaveSampleEvent: public wxEvent
      6 {
      7 public:
      8     SpekHaveSampleEvent(int bands, int sample, float *values, bool free_values);
      9     SpekHaveSampleEvent(const SpekHaveSampleEvent& other);
     10     ~SpekHaveSampleEvent();
     11 
     12     int get_bands() const { return this->bands; }
     13     int get_sample() const { return this->sample; }
     14     const float *get_values() const { return this->values; }
     15 
     16     wxEvent *Clone() const { return new SpekHaveSampleEvent(*this); }
     17 
     18 private:
     19     int bands;
     20     int sample;
     21     float *values;
     22     bool free_values;
     23 };
     24 
     25 typedef void (wxEvtHandler::*SpekHaveSampleEventFunction)(SpekHaveSampleEvent&);
     26 
     27 DECLARE_EVENT_TYPE(SPEK_HAVE_SAMPLE, wxID_ANY)
     28 
     29 #define SPEK_EVT_HAVE_SAMPLE(fn) \
     30     DECLARE_EVENT_TABLE_ENTRY(SPEK_HAVE_SAMPLE, -1, -1, \
     31     (wxObjectEventFunction) (SpekHaveSampleEventFunction) &fn, (wxObject *) NULL ),