fix(review): dead silenceFlags store removed; channelModeFor extracted + tested; auto-default + drop comments corrected; v9 constant minted
This commit is contained in:
@@ -505,16 +505,15 @@ std::string ReaSamplerProcessor::reloadFromBank() {
|
||||
std::optional<SelectedSample> sel =
|
||||
selectSample(*banksJson, selectedSampleId());
|
||||
if (sel) {
|
||||
// GA auto-default: while the channel mode is IMPLICIT (never user-toggled),
|
||||
// follow the loaded capture's channel count — a stereo capture decodes (and
|
||||
// shows) Stereo, a mono one Mono. An unknown count (0, an older bank entry)
|
||||
// changes nothing; an explicit user choice is never fought. Decode-only: the
|
||||
// output bus is fixed stereo, so no bus work follows a flip.
|
||||
if (sel->channelCount > 0) {
|
||||
const ChannelMode desired = sel->channelCount >= 2 ? ChannelMode::Stereo
|
||||
: ChannelMode::Mono;
|
||||
// GA auto-default: channelModeFor computes the mode from the loaded capture's
|
||||
// REQUESTED channel count (always 2 for extension captures; mono only for
|
||||
// ingest-imported mono files). An unknown count (0) or explicit user choice
|
||||
// returns the current mode unchanged. Decode-only: the output bus is fixed
|
||||
// stereo, so no bus work follows a flip.
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(channelModeMutex_);
|
||||
if (!channelModeExplicit_) channelMode_ = desired;
|
||||
channelMode_ = channelModeFor(sel->channelCount, channelMode_,
|
||||
channelModeExplicit_);
|
||||
mode = channelMode_;
|
||||
}
|
||||
std::optional<DecodedZonePcm> pcm =
|
||||
@@ -888,9 +887,6 @@ tresult PLUGIN_API ReaSamplerProcessor::process(ProcessData& data) {
|
||||
// render ADDS into a cleared buffer — RT-safe (no alloc/IO/lock). NEVER reads the mode here.
|
||||
float* ch0 = out.numChannels > 0 ? out.channelBuffers32[0] : nullptr;
|
||||
float* ch1 = out.numChannels > 1 ? out.channelBuffers32[1] : nullptr;
|
||||
// The PLUG-IN owns output silenceFlags (VST3 contract). Claim non-silence on every rendered
|
||||
// block — a stale host-side flag left unwritten could mute a channel downstream (GA).
|
||||
out.silenceFlags = 0;
|
||||
if (ch0 && ch1) {
|
||||
// Stereo: clear both, render L/R. A mono sample plays dual-mono via the engine's stereo
|
||||
// path (both channels equal), so a mono capture in stereo mode is centered, not silent.
|
||||
|
||||
Reference in New Issue
Block a user