sfizz/plugins/vst/SfizzVstState.h

41 lines
1.1 KiB
C
Raw Normal View History

2020-03-05 11:16:47 +01:00
// SPDX-License-Identifier: BSD-2-Clause
// This code is part of the sfizz library and is licensed under a BSD 2-clause
// license. You should have receive a LICENSE.md file along with the code.
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
#pragma once
#include "base/source/fstreamer.h"
#include <absl/types/optional.h>
2020-03-05 11:16:47 +01:00
#include <string>
#include <vector>
2020-03-05 11:16:47 +01:00
using namespace Steinberg;
class SfizzVstState {
public:
2020-06-20 05:49:00 +02:00
SfizzVstState() { sfzFile.reserve(8192); scalaFile.reserve(8192); }
2020-03-28 17:00:07 +01:00
2020-03-05 11:16:47 +01:00
std::string sfzFile;
2020-03-05 18:21:46 +01:00
float volume = 0;
int32 numVoices = 64;
int32 oversamplingLog2 = 0;
int32 preloadSize = 8192;
2020-06-20 05:49:00 +02:00
std::string scalaFile;
int32 scalaRootKey = 60;
float tuningFrequency = 440.0;
float stretchedTuning = 0.0;
int32 sampleQuality = 2;
2021-04-10 17:48:13 +02:00
int32 oscillatorQuality = 1;
std::vector<absl::optional<float>> controllers;
2020-03-05 11:16:47 +01:00
2021-04-10 17:48:13 +02:00
static constexpr uint64 currentStateVersion = 3;
2020-03-05 11:16:47 +01:00
tresult load(IBStream* state);
tresult store(IBStream* state) const;
};
2020-03-05 18:21:46 +01:00
2020-08-12 19:23:50 +02:00
struct SfizzPlayState {
uint32 activeVoices;
};