mirror of
https://github.com/kkapsner/CanvasBlocker
synced 2025-07-04 20:46:39 +02:00
parent
53cdf8347e
commit
e47f726abb
4 changed files with 17 additions and 13 deletions
|
@ -154,6 +154,7 @@
|
|||
return status;
|
||||
}
|
||||
|
||||
const getChannelDataAlreadyFakedArrays = new WeakMap();
|
||||
// changed functions and their fakes
|
||||
scope.changedFunctions = {
|
||||
getFloatFrequencyData: {
|
||||
|
@ -218,9 +219,12 @@
|
|||
return function getChannelData(channel){
|
||||
return checkerWrapper(checker, this, arguments, function(args, check){
|
||||
var {prefs, notify, window, original} = check;
|
||||
notify("fakedAudioReadout");
|
||||
var ret = original.apply(this, window.Array.from(args));
|
||||
fakeFloat32Array(ret, window, prefs);
|
||||
if (!getChannelDataAlreadyFakedArrays.get(ret)){
|
||||
notify("fakedAudioReadout");
|
||||
fakeFloat32Array(ret, window, prefs);
|
||||
getChannelDataAlreadyFakedArrays.set(ret, true);
|
||||
}
|
||||
return ret;
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue