{
	"amp": {
		"body": [
			"amp(${1:vol}, ${2:[time]})"
		],
		"description": "Set amplitude (volume) of a mic input between 0 and 1.0.",
		"prefix": "amp"
	},
	"connect": {
		"body": [
			"connect(${1:[unit]})"
		],
		"description": "Connect to an audio unit. If no parameter is provided, will connect to the master output (i.e. your speakers).",
		"prefix": "connect"
	},
	"disconnect": {
		"body": [
			"disconnect()"
		],
		"description": "Disconnect the AudioIn from all audio units. For example, if connect() had been called, disconnect() will stop sending  signal to your speakers.",
		"prefix": "disconnect"
	},
	"enabled": {
		"body": [
			"enabled"
		],
		"description": "Client must allow browser to access their microphone / audioin source. Default: false. Will become true when the client enables acces.",
		"prefix": "enabled"
	},
	"getLevel": {
		"body": [
			"getLevel(${1:[smoothing]})"
		],
		"description": "Read the Amplitude (volume level) of an AudioIn. The AudioIn class contains its own instance of the Amplitude class to help make it easy to get a microphone's volume level. Accepts an optional smoothing value (0.0 \u003c 1.0). NOTE: AudioIn must .start() before using .getLevel().",
		"prefix": "getLevel"
	},
	"getSources": {
		"body": [
			"getSources(${1:callback})"
		],
		"description": "Chrome only. Returns a list of available input sources  and allows the user to set the media source. Firefox allows  the user to choose from input sources in the permissions dialogue instead of enumerating available sources and selecting one. Note: in order to have descriptive media names your page must be  served over a secure (HTTPS) connection and the page should  request user media before enumerating devices. Otherwise device  ID will be a long device ID number and does not specify device  type. For example see  https://simpl.info/getusermedia/sources/index.html vs. http://simpl.info/getusermedia/sources/index.html",
		"prefix": "getSources"
	},
	"setSource": {
		"body": [
			"setSource(${1:num})"
		],
		"description": "Set the input source. Accepts a number representing a position in the array returned by listSources(). This is only available in browsers that support  MediaStreamTrack.getSources(). Instead, some browsers give users the option to set their own media source.",
		"prefix": "setSource"
	},
	"start": {
		"body": [
			"start(${1:successCallback}, ${2:errorCallback})"
		],
		"description": "Start processing audio input. This enables the use of other AudioIn methods like getLevel(). Note that by default, AudioIn is not connected to p5.sound's output. So you won't hear anything unless you use the connect() method. Certain browsers limit access to the user's microphone. For example, Chrome only allows access from localhost and over https. For this reason, you may want to include an errorCallbackâ€”a function that is called in case the browser won't provide mic access.",
		"prefix": "start"
	},
	"stop": {
		"body": [
			"stop()"
		],
		"description": "Turn the AudioIn off. If the AudioIn is stopped, it cannot getLevel(). If re-starting, the user may be prompted for permission access.",
		"prefix": "stop"
	}
}