Skip to content

lass: only allocate amp buffer if used by clipping mode - #94

Merged
passyur merged 1 commit into
mainfrom
claude/unruffled-zhukovsky-ab8176
Jun 8, 2026
Merged

lass: only allocate amp buffer if used by clipping mode#94
passyur merged 1 commit into
mainfrom
claude/unruffled-zhukovsky-ab8176

Conversation

@passyur

@passyur passyur commented Jun 8, 2026

Copy link
Copy Markdown
Member

cuts like ~30% of memory allocs

basically, each Track has two SoundSample buffers—amp and wave—of identical size (typically on the order of MB). Was often the case that amp was not used by the clipping mode but was still being allocated. Claude says this:

Per-channel unit — 8-channel piece, 1 minute, 44.1 kHz:

samples/channel = 60 × 44100 = 2,646,000
wave buffer/channel = 2,646,000 × 4 B ≈ 10.1 MB
old Track/channel = wave + amp ≈ 20.2 MB (half of it amp)
final 8-channel score buffer: old ≈ 162 MB (81 wave + 81 amp) → new ≈ 81 MB

@passyur
passyur merged commit 4d1f87d into main Jun 8, 2026
4 checks passed
@passyur
passyur deleted the claude/unruffled-zhukovsky-ab8176 branch June 8, 2026 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant