WebSockets: rename Node to ANode to avoid shadowing DOM Node class

This commit is contained in:
Luciano Iam 2020-04-12 14:59:29 +02:00 committed by Robin Gareus
parent b8f52a519a
commit a8dce60eb5
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 14 additions and 14 deletions

View File

@ -16,7 +16,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/ */
import { MessageChannel, Message, Node } from './channel.js'; import { MessageChannel, Message, ANode } from './channel.js';
export class Ardour { export class Ardour {
@ -69,51 +69,51 @@ export class Ardour {
// clients need to call open() before calling these methods // clients need to call open() before calling these methods
async getTempo () { async getTempo () {
return (await this._sendAndReceive(Node.TEMPO))[0]; return (await this._sendAndReceive(ANode.TEMPO))[0];
} }
async getStripGain (stripId) { async getStripGain (stripId) {
return (await this._sendAndReceive(Node.STRIP_GAIN, [stripId]))[0]; return (await this._sendAndReceive(ANode.STRIP_GAIN, [stripId]))[0];
} }
async getStripPan (stripId) { async getStripPan (stripId) {
return (await this._sendAndReceive(Node.STRIP_PAN, [stripId]))[0]; return (await this._sendAndReceive(ANode.STRIP_PAN, [stripId]))[0];
} }
async getStripMute (stripId) { async getStripMute (stripId) {
return (await this._sendAndReceive(Node.STRIP_MUTE, [stripId]))[0]; return (await this._sendAndReceive(ANode.STRIP_MUTE, [stripId]))[0];
} }
async getStripPluginEnable (stripId, pluginId) { async getStripPluginEnable (stripId, pluginId) {
return (await this._sendAndReceive(Node.STRIP_PLUGIN_ENABLE, [stripId, pluginId]))[0]; return (await this._sendAndReceive(ANode.STRIP_PLUGIN_ENABLE, [stripId, pluginId]))[0];
} }
async getStripPluginParamValue (stripId, pluginId, paramId) { async getStripPluginParamValue (stripId, pluginId, paramId) {
return (await this._sendAndReceive(Node.STRIP_PLUGIN_PARAM_VALUE, [stripId, pluginId, paramId]))[0]; return (await this._sendAndReceive(ANode.STRIP_PLUGIN_PARAM_VALUE, [stripId, pluginId, paramId]))[0];
} }
setTempo (bpm) { setTempo (bpm) {
this._send(Node.TEMPO, [], [bpm]); this._send(ANode.TEMPO, [], [bpm]);
} }
setStripGain (stripId, db) { setStripGain (stripId, db) {
this._send(Node.STRIP_GAIN, [stripId], [db]); this._send(ANode.STRIP_GAIN, [stripId], [db]);
} }
setStripPan (stripId, value) { setStripPan (stripId, value) {
this._send(Node.STRIP_PAN, [stripId], [value]); this._send(ANode.STRIP_PAN, [stripId], [value]);
} }
setStripMute (stripId, value) { setStripMute (stripId, value) {
this._send(Node.STRIP_MUTE, [stripId], [value]); this._send(ANode.STRIP_MUTE, [stripId], [value]);
} }
setStripPluginEnable (stripId, pluginId, value) { setStripPluginEnable (stripId, pluginId, value) {
this._send(Node.STRIP_PLUGIN_ENABLE, [stripId, pluginId], [value]); this._send(ANode.STRIP_PLUGIN_ENABLE, [stripId, pluginId], [value]);
} }
setStripPluginParamValue (stripId, pluginId, paramId, value) { setStripPluginParamValue (stripId, pluginId, paramId, value) {
this._send(Node.STRIP_PLUGIN_PARAM_VALUE, [stripId, pluginId, paramId], [value]); this._send(ANode.STRIP_PLUGIN_PARAM_VALUE, [stripId, pluginId, paramId], [value]);
} }
// Private methods // Private methods

View File

@ -18,7 +18,7 @@
export const JSON_INF = 1.0e+128; export const JSON_INF = 1.0e+128;
export const Node = Object.freeze({ export const ANode = Object.freeze({
TEMPO: 'tempo', TEMPO: 'tempo',
STRIP_DESC: 'strip_desc', STRIP_DESC: 'strip_desc',
STRIP_METER: 'strip_meter', STRIP_METER: 'strip_meter',