T15: drop WebAudio master for tracks - native master gain + track gain/pan IPC (SF/VST2/VST3 bridges), NativeAudioService + /api/v1/native router, native-first TrackInstrument, test matrix 8 passed
This commit is contained in:
@@ -1980,6 +1980,8 @@ const MasterStripConsole = ({ masterVolume, setMasterVolume, showMasteringModal,
|
||||
|
||||
const handleFaderChange = (val) => {
|
||||
setMasterVolume(val);
|
||||
// T15: master fader track instrument → native engine (NativeMixer)
|
||||
if (window.SonicNativeAudio) window.SonicNativeAudio.setMasterGain(val);
|
||||
ensureAudio();
|
||||
if (masterBus && masterBus.output) {
|
||||
const linear = val <= -50 ? 0 : Math.pow(10, val / 20);
|
||||
@@ -24241,6 +24243,12 @@ const App = () => {
|
||||
if (sn && sn.gainNode) sn.gainNode.gain.setValueAtTime(volLinear, ctx.currentTime);
|
||||
}
|
||||
});
|
||||
// T15: track gain → native engine (NativeMixer)
|
||||
if (window.SonicNativeAudio) {
|
||||
const trk = (tracks || []).find(t => t.id === trackId);
|
||||
const curPan = trk && trk.pan != null ? trk.pan : 0;
|
||||
window.SonicNativeAudio.setTrackGainPan(trackId, val, curPan);
|
||||
}
|
||||
};
|
||||
const updateTrackPan = (trackId, val) => {
|
||||
const beforeSnap = captureTrackSnapshot(trackId);
|
||||
@@ -24264,6 +24272,12 @@ const App = () => {
|
||||
if (nodes) {
|
||||
nodes.pannerNode.pan.setValueAtTime(val / 100, getAudioContext().currentTime);
|
||||
}
|
||||
// T15: track pan → native engine (NativeMixer; pan -100..100 → -1..1)
|
||||
if (window.SonicNativeAudio) {
|
||||
const trk = (tracks || []).find(t => t.id === trackId);
|
||||
const curVol = trk && trk.volumeDb != null ? trk.volumeDb : 0;
|
||||
window.SonicNativeAudio.setTrackGainPan(trackId, curVol, val / 100);
|
||||
}
|
||||
};
|
||||
const updateTrackName = (trackId, name) => {
|
||||
const beforeSnap = captureTrackSnapshot(trackId);
|
||||
|
||||
Reference in New Issue
Block a user