New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

audio-slot

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audio-slot - npm Package Compare versions

Comparing version 4.1.0 to 4.2.0

routable.js

60

index.js

@@ -8,2 +8,3 @@ var Observ = require('observ')

var Property = require('observ-default')
var RoutableSlot = require('./routable')

@@ -31,3 +32,3 @@ module.exports = AudioSlot

var obs = ObservStruct({
var obs = RoutableSlot(context, {
id: Observ(),

@@ -39,20 +40,8 @@ sources: NodeArray(context),

volume: Property(1)
})
}, input, output)
obs._type = 'AudioSlot'
obs.context = context
context.noteOffset = obs.noteOffset
context.slot = obs
obs.volume(function (value) {
output.gain.value = value
})
obs.input = input
// main output
obs.output(queueRefreshConnections)
var removeSlotWatcher = context.slotLookup && context.slotLookup(refreshConnections)
// reconnect sources on add / update

@@ -149,17 +138,2 @@ var connectedSources = []

obs.connect = function (to) {
extraConnections.push(to)
refreshConnections()
}
obs.disconnect = function () {
extraConnections.length = 0
refreshConnections()
}
obs.destroy = function () {
removeSlotWatcher && removeSlotWatcher()
removeSlotWatcher = null
}
return obs

@@ -169,30 +143,2 @@

function queueRefreshConnections () {
if (!refreshingConnections) {
refreshingConnections = true
nextTick(refreshConnections)
}
}
function refreshConnections () {
refreshingConnections = false
output.disconnect()
extraConnections.forEach(function (target) {
output.connect(target)
})
var outputNames = typeof obs.output() === 'string' ? [obs.output()] : obs.output()
if (Array.isArray(outputNames)) {
outputNames.forEach(function (name) {
var destinationSlot = context.slotLookup.get(name)
if (destinationSlot && destinationSlot.input) {
output.connect(destinationSlot.input)
}
})
}
}
function updateProcessors () {

@@ -199,0 +145,0 @@ if (checkProcessorsChanged()) {

{
"name": "audio-slot",
"version": "4.1.0",
"version": "4.2.0",
"description": "Web Audio API FRP wrapper for creating, routing, and triggering AudioNodes.",

@@ -25,3 +25,4 @@ "main": "index.js",

"observ-node-array": "^1.10.0",
"observ-struct": "^6.0.0"
"observ-struct": "^6.0.0",
"xtend": "~4.0.0"
},

@@ -28,0 +29,0 @@ "keywords": [

@@ -62,2 +62,4 @@ var Processor = require('../processor.js')

filter.Q.value = 0
Apply(context, wet.gain, obs.wet)

@@ -64,0 +66,0 @@ Apply(context, dry.gain, obs.dry)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc