fix: set subTab buffer + fix double stop() call + realtime playhead
This commit is contained in:
@@ -9862,7 +9862,10 @@ const App = () => {
|
||||
recordingStartTimeRef.current = startTime;
|
||||
setRecordingState('RECORDING');
|
||||
setRecTempMidiNotes([]);
|
||||
startSubTabPlayback(tab, startTime);
|
||||
const ctx = getAudioContext();
|
||||
const silentBuf = ctx.createBuffer(1, 128, ctx.sampleRate);
|
||||
setSubTabs(prev => prev.map(s => s.id === tab.id ? { ...s, buffer: silentBuf } : s));
|
||||
startSubTabPlayback({ ...tab, buffer: silentBuf }, startTime);
|
||||
startOffsetTimeRef.current = startTime;
|
||||
startAudioTimeRef.current = context.currentTime;
|
||||
setIsPlaying(true);
|
||||
@@ -10081,7 +10084,6 @@ const App = () => {
|
||||
|
||||
for (let trackId in midiRecorders) {
|
||||
const midiRec = midiRecorders[trackId];
|
||||
const recordedNotes = midiRec.stop();
|
||||
|
||||
if (midiRec.tempTabId) {
|
||||
const recordedNotes = midiRec.stop();
|
||||
|
||||
Reference in New Issue
Block a user