{"name":"enableAudioFeature","title":"enableAudioFeature","type":"command","url":"https://community.bistudio.com/wiki/enableAudioFeature","revid":363491,"updated":"2024-04-01T10:41:02Z","groups":["Sounds"],"status":"ok","games":{"arma3":"1.64"},"since":"arma3 1.64","arma3_since":"1.64","locality":{"argument":"global","effect":"local"},"description":"Get the state of **or** enable/disable an audio feature. Available features are `\"lowpass\"` and `\"building_interior\"`.\n\n- Arma 3 v2.14 it is possible to enable `\"building_interior\"` on an object placed in a building.\n- Arma 3 v2.14 if 'enable' argument is omitted, the command returns the current state of the feature.","syntaxes":[{"syntax":"enableAudioFeature [feature, enable]","params":[{"name":"feature","type":"String","description":"`\"lowpass\"` or `\"building_interior\"`","type_expr":"String"},{"name":"enable","type":"Boolean","optional":true,"description":"true enable, false, disable","type_expr":"Boolean","text":"enable: Boolean - (Optional, getter if not provided) true enable, false, disable"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"previous state"},"form":"unary","right":{"text":"[feature, enable]"}},{"syntax":"object enableAudioFeature [feature, enable]","since":"arma3 2.14","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"feature","type":"String","description":"`\"building_interior\"` or `\"building_exterior\"` only (mutually exclusive)","type_expr":"String"},{"name":"enable","type":"Boolean","optional":true,"description":"true enable, false, disable","type_expr":"Boolean","text":"enable: Boolean - (Optional, getter if not provided) true enable, false, disable"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"previous state"},"form":"binary","left":{"text":"object"},"right":{"text":"[feature, enable]"}}],"examples":[{"code":["private _prevState = enableAudioFeature [\"lowpass\", true];"]},{"code":["private _prevState = pallet enableAudioFeature [\"building_interior\", true];"]},{"code":["private _currState = pallet enableAudioFeature [\"building_interior\"];\nprivate _prevState = pallet enableAudioFeature [\"building_interior\", !_currState];\nhint str (_currState == _prevState); // true\n\nprivate _currState = pallet enableAudioFeature [\"building_interior\"];\nhint str (_currState == _prevState); // false"]}],"multiplayer":"To use this command on objects in multiplayer, remoteExec it globally with JIP queue enabled:\n\n```sqf\n[_obj, [\"building_interior\", true]] remoteExec [\"enableAudioFeature\", 0, _obj];\n```","see_also":["insideBuilding"]}