Enable unpausing in webstudio

This commit is contained in:
Matthew Stratford 2021-09-03 21:20:37 +01:00
parent b022281704
commit b3a35b04db

View file

@ -609,16 +609,11 @@ export const load = (
if (process.env.REACT_APP_BAPSICLE_INTERFACE) { if (process.env.REACT_APP_BAPSICLE_INTERFACE) {
// If user manually seeks on the waveform, just direct that to the webserver. // If user manually seeks on the waveform, just direct that to the webserver.
playerInstance.on("timeChangeSeek", (time) => { playerInstance.on("timeChangeSeek", (time) => {
// Limit
//if (
// Math.abs(time - getState().mixer.players[player].timeCurrent) > 0.5
//) {
sendBAPSicleChannel({ sendBAPSicleChannel({
channel: player, channel: player,
command: "SEEK", command: "SEEK",
time: time, time: time,
}); });
//}
}); });
} else { } else {
playerInstance.on("play", () => { playerInstance.on("play", () => {
@ -804,7 +799,9 @@ export const unpause = (player: number): AppThunk => (dispatch, getState) => {
return; return;
} }
// TODO: WEBSTUDIO PAUSE if (!audioEngine.players[player]?.isPlaying) {
audioEngine.players[player]?.play();
}
}; };
export const stop = (player: number): AppThunk => (dispatch, getState) => { export const stop = (player: number): AppThunk => (dispatch, getState) => {