WIP
This commit is contained in:
parent
d735c1d076
commit
26a2935e1c
52 changed files with 1513 additions and 107 deletions
|
|
@ -2,7 +2,9 @@
|
|||
// Created by versustune on 22.03.20.
|
||||
//
|
||||
#include "AudioConfig.h"
|
||||
#include "../Audio/WaveTable/WaveTableGenerator.h"
|
||||
|
||||
std::shared_ptr<AudioConfig> AudioConfig::m_instance;
|
||||
float AudioConfig::getSampleRate() {
|
||||
return m_sampleRate;
|
||||
}
|
||||
|
|
@ -22,7 +24,7 @@ void AudioConfig::setBufferSize(float _bufferSize) {
|
|||
m_bufferSize = _bufferSize;
|
||||
}
|
||||
|
||||
bool AudioConfig::isNeedToReInit() {
|
||||
bool AudioConfig::isNeedToReInit() const {
|
||||
return m_needToReInit;
|
||||
}
|
||||
|
||||
|
|
@ -31,7 +33,15 @@ void AudioConfig::setNeedToReInit(bool _needToReInit) {
|
|||
}
|
||||
|
||||
std::shared_ptr<AudioConfig> AudioConfig::getInstance() {
|
||||
if (!m_instance)
|
||||
m_instance = std::make_shared<AudioConfig>();
|
||||
if (AudioConfig::m_instance == nullptr)
|
||||
AudioConfig::m_instance = std::make_shared<AudioConfig>();
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
void AudioConfig::initWaveTables() {
|
||||
WaveTableGenerator::getInstance().init();
|
||||
}
|
||||
|
||||
AudioConfig::~AudioConfig() {
|
||||
WaveTableGenerator::getInstance().cleanTables();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,10 +27,14 @@ public:
|
|||
|
||||
void setBufferSize(float _bufferSize);
|
||||
|
||||
bool isNeedToReInit();
|
||||
bool isNeedToReInit() const;
|
||||
|
||||
void setNeedToReInit(bool _needToReInit);
|
||||
|
||||
static void initWaveTables();
|
||||
|
||||
~AudioConfig();
|
||||
|
||||
protected:
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ Config::Config() {
|
|||
|
||||
m_theme = std::make_shared<Theme>(m_config);
|
||||
m_theme->init();
|
||||
m_fps = m_config->getIntValue("waveform_fps", 60);
|
||||
}
|
||||
|
||||
void Config::saveAll() {
|
||||
|
|
@ -29,7 +30,7 @@ int Config::getCurrentLook() {
|
|||
|
||||
void Config::initConfig() {
|
||||
PropertiesFile::Options options;
|
||||
options.applicationName = "m_config";
|
||||
options.applicationName = "config";
|
||||
options.folderName = "veno";
|
||||
options.filenameSuffix = "xml";
|
||||
m_config = std::make_unique<PropertiesFile>(options);
|
||||
|
|
@ -40,7 +41,7 @@ std::shared_ptr<Theme> Config::getCurrentTheme() {
|
|||
}
|
||||
|
||||
double Config::getScale() {
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void Config::setColourForIndex(Colour *colour, ThemeColour index) {
|
||||
|
|
@ -73,7 +74,11 @@ int Config::getEditorCount() {
|
|||
}
|
||||
|
||||
std::shared_ptr<Config> Config::getInstance() {
|
||||
if (!m_instance)
|
||||
if (m_instance == nullptr)
|
||||
m_instance = std::make_shared<Config>();
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
int Config::getFps() const {
|
||||
return m_fps;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ private:
|
|||
static std::shared_ptr<Config> m_instance;
|
||||
int m_currentLook = 0; //nah move the bitch logic from current to next
|
||||
std::unordered_map<std::string, AudioProcessorEditor *> m_editors;
|
||||
int m_fps = 60;
|
||||
public:
|
||||
static std::shared_ptr<Config> getInstance();
|
||||
|
||||
|
|
@ -41,6 +42,8 @@ public:
|
|||
|
||||
int getEditorCount();
|
||||
|
||||
int getFps() const;
|
||||
|
||||
protected:
|
||||
void initConfig();
|
||||
};
|
||||
|
|
|
|||
5
Source/Veno/Core/PresetManager.cpp
Normal file
5
Source/Veno/Core/PresetManager.cpp
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
//
|
||||
// Created by versustune on 11.06.20.
|
||||
//
|
||||
|
||||
#include "PresetManager.h"
|
||||
14
Source/Veno/Core/PresetManager.h
Normal file
14
Source/Veno/Core/PresetManager.h
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
//
|
||||
// Created by versustune on 11.06.20.
|
||||
//
|
||||
|
||||
#ifndef VENO_PRESETMANAGER_H
|
||||
#define VENO_PRESETMANAGER_H
|
||||
|
||||
|
||||
class PresetManager {
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //VENO_PRESETMANAGER_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue