Skip to content

Commit

Permalink
Use the standard opcode value read for hint_ram_based
Browse files Browse the repository at this point in the history
  • Loading branch information
pferrand-soundhound authored and paulfd committed Dec 26, 2023
1 parent 1c77b96 commit 5a51e0b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/sfizz/Defaults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ UInt32Spec stringsNumber { maxStrings, {0, maxStrings}, 0 };
BoolSpec sustainCancelsRelease { false, {0, 1}, kEnforceBounds };
FloatSpec loTimer { 0.0f, {0.0f, float_max}, 0 };
FloatSpec hiTimer { float_max, {0.0f, float_max}, 0 };
BoolSpec ramBased { false, {0, 1}, kEnforceBounds };

ESpec<Trigger> trigger { Trigger::attack, {Trigger::attack, Trigger::release_key}, 0};
ESpec<CrossfadeCurve> crossfadeCurve { CrossfadeCurve::power, {CrossfadeCurve::gain, CrossfadeCurve::power}, 0};
Expand Down
1 change: 1 addition & 0 deletions src/sfizz/Defaults.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ namespace Default
extern const OpcodeSpec<bool> sustainCancelsRelease;
extern const OpcodeSpec<float> loTimer;
extern const OpcodeSpec<float> hiTimer;
extern const OpcodeSpec<bool> ramBased;

// Default/max count for objects
constexpr int numEQs { 3 };
Expand Down
8 changes: 1 addition & 7 deletions src/sfizz/Synth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,13 +441,7 @@ void Synth::Impl::handleControlOpcodes(const std::vector<Opcode>& members)
case hash("hint_ram_based"):
{
FilePool& filePool = resources_.getFilePool();
if (member.value == "1")
filePool.setRamLoading(true);
else if (member.value == "0")
filePool.setRamLoading(false);
else
DBG("Unsupported value for hint_ram_based: " << member.value);
break;
filePool.setRamLoading(member.read(Default::ramBased));
}
case hash("hint_stealing"):
switch(hash(member.value)) {
Expand Down

0 comments on commit 5a51e0b

Please sign in to comment.