Refactor: breakout function definition to cpp file
parent
145677f0f2
commit
6abdf89009
|
|
@ -0,0 +1,8 @@
|
||||||
|
#include "wavetable.h"
|
||||||
|
|
||||||
|
std::string Wavetable::name() {
|
||||||
|
std::string id_str = std::to_string(m_id);
|
||||||
|
id_str.append(": ");
|
||||||
|
id_str.append(m_name);
|
||||||
|
return id_str;
|
||||||
|
}
|
||||||
|
|
@ -9,18 +9,13 @@
|
||||||
|
|
||||||
/* Table of single cycle wave lookup tables */
|
/* Table of single cycle wave lookup tables */
|
||||||
class Wavetable {
|
class Wavetable {
|
||||||
private:
|
private:
|
||||||
uint16_t m_id{}; // Unique ID number of wavetable
|
uint16_t m_id{}; // Unique ID number of wavetable
|
||||||
std::string m_name{}; // String name of wavetable
|
std::string m_name{}; // String name of wavetable
|
||||||
std::array<Wave, DEFAULT_N_SAMPLES> m_table; // table data
|
std::array<Wave, DEFAULT_N_SAMPLES> m_table; // table data
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::string name() {
|
std::string name();
|
||||||
std::string id_str = std::to_string(m_id);
|
|
||||||
id_str.append(": ");
|
|
||||||
id_str.append(m_name);
|
|
||||||
return id_str;
|
|
||||||
}
|
|
||||||
|
|
||||||
void set_table(std::array<Wave, DEFAULT_N_SAMPLES> table) { m_table = table; }
|
void set_table(std::array<Wave, DEFAULT_N_SAMPLES> table) { m_table = table; }
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue