commit 1a7f14273a5298b0d7279a9b558da4d86297b64d
parent 7a933e00b31c45f0ad57b216942c4a57182247ac
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date: Sun, 9 Mar 2025 00:53:40 +0100
do not retransmit wavetables to device if the content is identical
Diffstat:
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/source/xtLib/xtState.cpp b/source/xtLib/xtState.cpp
@@ -104,10 +104,10 @@ namespace xt
}
for (const auto& waveId : waveIds)
- append(_state, m_waves[waveId.rawId()], wLib::IdxCommand);
+ append(_state, m_waves[waveId.rawId()], 7);
for (const auto& tableId : tableIds)
- append(_state, m_tables[tableId.rawId()], wLib::IdxCommand);
+ append(_state, m_tables[tableId.rawId()], 7);
const auto multiMode = isMultiMode();
@@ -405,9 +405,16 @@ namespace xt
if(idx >= m_waves.size())
return false;
+ const auto old = m_waves[idx];
+
if(!convertTo(m_waves[idx], _data))
return false;
+ if (m_waves[idx] == old)
+ return true;
+
+ forwardToDevice(_data);
+
return true;
}
@@ -709,7 +716,7 @@ namespace xt
return false;
}
- if(res)
+ if(res && _type != DumpType::Wave)
forwardToDevice(_data);
return res;
}