kwave  18.07.70
Osc.h
Go to the documentation of this file.
1 /***************************************************************************
2  Osc.h - simple sine oscillator
3  -------------------
4  begin : Tue Nov 06 2007
5  copyright : (C) 2007 by Thomas Eschenbacher
6  email : Thomas.Eschenbacher@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef OSC_H
19 #define OSC_H
20 
21 #include "config.h"
22 
23 #include <QtGlobal>
24 #include <QObject>
25 #include <QVariant>
26 
27 #include "libkwave/SampleSource.h"
28 
29 namespace Kwave
30 {
31 
32  class Q_DECL_EXPORT Osc: public Kwave::SampleSource
33  {
34  Q_OBJECT
35  public:
37  Osc();
38 
40  virtual ~Osc() Q_DECL_OVERRIDE;
41 
43  virtual void goOn() Q_DECL_OVERRIDE;
44 
45  signals:
47  void output(Kwave::SampleArray data);
48 
49  public slots:
56  void setFrequency(const QVariant &f);
57 
62  void setPhase(const QVariant &p);
63 
68  void setAmplitude(const QVariant &a);
69 
70  private:
71 
74 
76  double m_omega_t;
77 
79  double m_f;
80 
82  double m_a;
83  };
84 }
85 
86 #endif /* OSC_H */
87 
88 //***************************************************************************
89 //***************************************************************************
Definition: App.h:33
Kwave::SampleArray m_buffer
Definition: Osc.h:73
double m_f
Definition: Osc.h:79
double m_omega_t
Definition: Osc.h:76
double m_a
Definition: Osc.h:82
Definition: Osc.h:32