fix: set subTab buffer + fix double stop() call + realtime playhead
This commit is contained in:
@@ -9862,7 +9862,10 @@ const App = () => {
|
|||||||
recordingStartTimeRef.current = startTime;
|
recordingStartTimeRef.current = startTime;
|
||||||
setRecordingState('RECORDING');
|
setRecordingState('RECORDING');
|
||||||
setRecTempMidiNotes([]);
|
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;
|
startOffsetTimeRef.current = startTime;
|
||||||
startAudioTimeRef.current = context.currentTime;
|
startAudioTimeRef.current = context.currentTime;
|
||||||
setIsPlaying(true);
|
setIsPlaying(true);
|
||||||
@@ -10081,7 +10084,6 @@ const App = () => {
|
|||||||
|
|
||||||
for (let trackId in midiRecorders) {
|
for (let trackId in midiRecorders) {
|
||||||
const midiRec = midiRecorders[trackId];
|
const midiRec = midiRecorders[trackId];
|
||||||
const recordedNotes = midiRec.stop();
|
|
||||||
|
|
||||||
if (midiRec.tempTabId) {
|
if (midiRec.tempTabId) {
|
||||||
const recordedNotes = midiRec.stop();
|
const recordedNotes = midiRec.stop();
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user