feat(bank_panel): docked bank grid with LICE waveform thumbnails (M5 Wave A)
Docked SWELL window toggled by a new action, drawing the current bank as per-sample min/max thumbnails (PCM_source + peaks) with an in-memory cache. Pure grid-layout/cache-key math in bank_grid (tested). Renames peaks::Sample -> AudioSample to avoid colliding with bank_model::Sample.
This commit is contained in:
+5
-5
@@ -14,7 +14,7 @@
|
||||
|
||||
namespace reasampler {
|
||||
|
||||
Envelope computeEnvelope(const std::vector<Sample>& interleaved,
|
||||
Envelope computeEnvelope(const std::vector<AudioSample>& interleaved,
|
||||
std::size_t channelCount,
|
||||
std::size_t frameCount,
|
||||
std::size_t binCount) {
|
||||
@@ -48,11 +48,11 @@ Envelope computeEnvelope(const std::vector<Sample>& interleaved,
|
||||
continue; // empty span (binCount > frames) -> keep {0,0}
|
||||
}
|
||||
|
||||
const Sample first = interleaved[begin * channelCount + ch];
|
||||
Sample lo = first;
|
||||
Sample hi = first;
|
||||
const AudioSample first = interleaved[begin * channelCount + ch];
|
||||
AudioSample lo = first;
|
||||
AudioSample hi = first;
|
||||
for (std::size_t f = begin + 1; f < end; ++f) {
|
||||
const Sample s = interleaved[f * channelCount + ch];
|
||||
const AudioSample s = interleaved[f * channelCount + ch];
|
||||
lo = std::min(lo, s);
|
||||
hi = std::max(hi, s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user