1
0
mirror of https://github.com/kkapsner/CanvasBlocker synced 2024-12-22 12:50:36 +01:00

Added api property to changedFunctions.

This commit is contained in:
kkapsner 2018-06-21 00:09:07 +02:00
parent e9fbb7259e
commit 1abc681e3f
2 changed files with 8 additions and 12 deletions

View File

@ -443,6 +443,9 @@
}
}
};
Object.keys(scope.changedFunctions).forEach(function(key){
scope.changedFunctions[key].api = "canvas";
});
Object.keys(modifiedAudioAPI.changedFunctions).forEach(function(key){
scope.changedFunctions[key] = modifiedAudioAPI.changedFunctions[key];
});

View File

@ -96,8 +96,6 @@
// changed functions and their fakes
scope.changedFunctions = {
getFloatFrequencyData: {
type: "readout",
getStatus: getStatus,
object: ["AnalyserNode"],
fakeGenerator: function(prefs, notify, window, original){
return function getFloatFrequencyData(array){
@ -109,8 +107,6 @@
}
},
getByteFrequencyData: {
type: "readout",
getStatus: getStatus,
object: ["AnalyserNode"],
fakeGenerator: function(prefs, notify, window, original){
return function getByteFrequencyData(array){
@ -135,8 +131,6 @@
}
},
getByteTimeDomainData: {
type: "readout",
getStatus: getStatus,
object: ["AnalyserNode"],
fakeGenerator: function(prefs, notify, window, original){
return function getByteTimeDomainData(array){
@ -148,8 +142,6 @@
}
},
getChannelData: {
type: "readout",
getStatus: getStatus,
object: ["AudioBuffer"],
fakeGenerator: function(prefs, notify, window, original){
return function getChannelData(channel){
@ -161,8 +153,6 @@
}
},
copyFromChannel: {
type: "readout",
getStatus: getStatus,
object: ["AudioBuffer"],
fakeGenerator: function(prefs, notify, window, original){
return function copyFromChannel(destination, channelNumber, startInChannel){
@ -174,8 +164,6 @@
}
},
getFrequencyResponse: {
type: "readout",
getStatus: getStatus,
object: ["BiquadFilterNode", "IIRFilterNode"],
fakeGenerator: function(prefs, notify, window, original){
return function getFrequencyResponse(frequencyArray, magResponseOutput, phaseResponseOutput){
@ -188,4 +176,9 @@
}
},
};
Object.keys(scope.changedFunctions).forEach(function(key){
scope.changedFunctions[key].type = "readout";
scope.changedFunctions[key].getStatus = getStatus;
scope.changedFunctions[key].api = "audio";
});
}());