low jitter timer monotonic and various bug fixes#1329
Open
emrum wants to merge 17 commits into
Open
Conversation
…MP0148/CMP0177 warnings
…ribute values
Two bugs in the #else (non-HAVE_ISTRINGSTREAM_HEXFLOAT) path:
1. QString('.') in Qt6 resolves to QString(int=46, QChar()) instead of a
single-character string ".". This caused s.replace('.', hexfloatDecimalPoint)
to expand each '.' in the hex-float string to 46 null chars, making
ba.size() >> (end - sc), so ok was always false and the parsed value
was discarded.
2. xml.s2() can carry a trailing space or newline from the XML tokeniser.
strtod parses the value correctly but stops before the whitespace, so
(end - sc) < ba.size() and ok was set false even though rv was correct.
This caused spurious "CtrlList::read failed reading _curVal string" log
spam on every song load, for all automation values stored as hex-floats.
Fix: remove the locale-translation replace() entirely (strtod handles
hex-float '.' natively in all C99+ implementations regardless of system
locale), and call s.trimmed() before toLatin1() so trailing whitespace
does not affect the size comparison.
hexfloatDecimalPoint is retained as a symbol for ABI compatibility but
is no longer used; initialised as QString(QChar('.')) to document the
correct Qt5/Qt6 portable spelling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch also contains the CLAP host integration.
Current Status: works well, more testing recommended.
This PR introduces a modern monotonic high‑resolution timer with optional real‑time priority,
replaces legacy POSIX timer usage,
fixes several stability issues,
and ensures correct MIDI PPQN application during file load.
Fix for hexfloat_reading and application of mixer settings.
**Fixes number parsing with different locale setting **
** Fix minor compiler warnings **
Key Improvements
CLAP Plugin Host Integration
Synths are supported
CLAP plugin GUI - supported.
Preset save/restore - supported.
Not supported yet: CLAP Effects plugins (muse "plugin" type) .
Modern Monotonic Timer
Replaces older posix_timer logic with a monotonic high‑resolution timer.
Uses real‑time priority if permitted by the system for improved jitter and stability.
MIDI Division (PPQN) Handling
Bug Fixes
Why This Matters