diff --git a/bin/web/js/audio.js b/bin/web/js/audio.js index cf102e4..c3feb2a 100644 --- a/bin/web/js/audio.js +++ b/bin/web/js/audio.js @@ -51,6 +51,14 @@ const Audio = function(tp, record) { return false; } if (!mapping[layer.id()].hasOwnProperty(propTitle)) { + if (propTitle === 'color' && + config.audio.colorSeparateRGBA && + mapping[layer.id()].hasOwnProperty('color.r') && + mapping[layer.id()].hasOwnProperty('color.g') && + mapping[layer.id()].hasOwnProperty('color.b') && + mapping[layer.id()].hasOwnProperty('color.a')) { + return true; + } return false; } return true; @@ -121,7 +129,7 @@ const Audio = function(tp, record) { if (!mapping[layer.id()].hasOwnProperty(propTitle)) { // no propTitle // perhaps color? - if (config.audio.separateRGBA && propTitle === 'color') { + if (config.audio.colorSeparateRGBA && propTitle === 'color') { let isGood = true; isGood = removeAudioMapping(layer, 'color.r'); isGood = removeAudioMapping(layer, 'color.g'); @@ -148,6 +156,7 @@ const Audio = function(tp, record) { audioOptions.style.position = 'relative'; audioOptions.style.width = '100%'; if (propTitle.split('.')[0] === 'color' && propTitle.split('.').length > 1) { + audioOptions.classList.add(toCssClass('audioOptionscolor')); switch(propTitle.split('.')[1]) { case 'r': { audioOptions.style.background = 'rgba(255,0,0,0.2)'; @@ -513,7 +522,7 @@ const Audio = function(tp, record) { convolver.buffer = buffer; }, function(e) { - console.log("Error with decoding audio data" + e.err); + console.log("Audio::audioCtx.decodeAudioData", "Error with decoding audio data" + e.err); } ); };