AudioDeviceInput
Produces audio streams from physical devices, such as microphones.
Memory category | Internal |
---|
Member index 12
Description
AudioDeviceInput produces audio streams from physical devices, such as microphones. It provides a single Output pin which can be connected to other pins via Wires. AudioDeviceInput has properties for selecting which Player is producing the stream, and controlling whether or not they are muted.
History 25
- 652 Add WiringChanged
- 648 Change ReturnType of GetConnectedWires from Objects to Instances
- 644 Add MutedByLocalUser
- 643 Change Tags of AudioDeviceInput from [NotBrowsable] to []
- 637 Change ReturnType of GetConnectedWires from Array to Objects
- 629 Add Volume
- 618 Change Security of GetConnectedWires from PluginSecurity to None
- 607 Change Security of GetConnectedWires from RobloxScriptSecurity to PluginSecurity
- 597 Change MemoryCategory of AudioDeviceInput from Instances to Internal
- 593 Add GetConnectedWires
- 592 Change Category of Player from Data to Recording
- 592 Change Category of Muted from Data to Recording
- 592 Change Category of IsReady from Data to Recording
- 592 Change Category of Active from Data to Recording
- 592 Change Category of AccessType from Data to Permissions
- 592 Change Category of from userIds to Permissions
- 588 Add SetUserIdAccessList
- 588 Add GetUserIdAccessList
- 588 Add Player
- 588 Add Muted
- 588 Add IsReady
- 588 Add Active
- 588 Add AccessType
- 588 Add
- 588 Add AudioDeviceInput
Members 12
AccessType
Type | Default | |
---|---|---|
AccessModifierType | Deny |
Determines whether the list of user IDs provided to SetUserIdAccessList is treated as an allow-list or deny-list.
If AccessType is AccessModifierType.Allow, then only the supplied user IDs are permitted to hear this AudioDeviceInput. If AccessType is AccessModifierType.Deny, then only the supplied user IDs are blocked from hearing this AudioDeviceInput.
Since player voices are networked, this property should only be assigned from the server in order to replicate properly.
Thread safety | ReadSafe |
---|---|
Category | Permissions |
Loaded/Saved | true |
History 2
- 592 Change Category of AccessType from Data to Permissions
- 588 Add AccessType
Active
Type | Default | |
---|---|---|
bool | true |
Controls whether the physical device is actively recording. This property is only set by Roblox core scripts, but it may be read by user scripts. Generally, an AudioDeviceInput may only be producing sound if Active is true and Muted is false.
Write security | RobloxScriptSecurity |
---|---|
Thread safety | ReadSafe |
Category | Recording |
Loaded/Saved | true |
GetConnectedWires
Parameters (1) | ||
---|---|---|
pin | string | |
Returns (1) | ||
Instances |
Returns an array of Wires that are connected to the specified pin. AudioDeviceInput has one "Output" pin.
Thread safety | Unsafe |
---|
History 5
- 648 Change ReturnType of GetConnectedWires from Objects to Instances
- 637 Change ReturnType of GetConnectedWires from Array to Objects
- 618 Change Security of GetConnectedWires from PluginSecurity to None
- 607 Change Security of GetConnectedWires from RobloxScriptSecurity to PluginSecurity
- 593 Add GetConnectedWires
GetUserIdAccessList
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Array |
Returns a list of user IDs that are either permitted to hear or blocked from hearing this AudioDeviceInput, depending on the AccessType.
Thread safety | Unsafe |
---|
History 1
IsReady
Type | Default | |
---|---|---|
bool | false |
Denotes whether this AudioDeviceInput is ready to produce sound, meaning all network connections have been established.
Security | RobloxScriptSecurity |
---|---|
Thread safety | ReadSafe |
Category | Recording |
Loaded/Saved | false/true |
Muted
Type | Default | |
---|---|---|
bool | false |
Controls whether this AudioDeviceInput is muted. Unlike Active, this property is publicly scriptable.
Generally, an AudioDeviceInput may only be heard if Active is true and Muted is false.
Thread safety | ReadSafe |
---|---|
Category | Recording |
Loaded/Saved | true |
MutedByLocalUser
Type | Default | |
---|---|---|
bool | false |
Security | RobloxScriptSecurity |
---|---|
Thread safety | ReadSafe |
Category | Recording |
Loaded/Saved | false |
History 1
- 644 Add MutedByLocalUser
Player
Type | Default | |
---|---|---|
Player |
Determines whose device is producing sound. In order to replicate properly, this should only be assigned from the server. Assigning this property locally generally does not work, unless Player is Players.LocalPlayer.
Thread safety | ReadSafe |
---|---|
Category | Recording |
Loaded/Saved | true |
SetUserIdAccessList
Parameters (1) | ||
---|---|---|
userIds | Array | |
Returns (1) | ||
null |
Sets a list of user IDs that are either permitted to hear or blocked from hearing this AudioDeviceInput, depending on the AccessType.
Note that this method replicates from server to client; in general, it should only be called from the server in order to replicate properly.
Thread safety | Unsafe |
---|
History 1
Volume
Type | Default | |
---|---|---|
float | 1 |
Volume level which is multiplied onto the output audio stream. Ranges from 0 to 3.
Thread safety | ReadSafe |
---|---|
Category | State |
Loaded/Saved | true |
WiringChanged
Parameters (4) | |
---|---|
connected | bool |
pin | string |
wire | Wire |
instance | Instance |
Thread safety | Unsafe |
---|
History 1
- 652 Add WiringChanged