AudioDeviceOutput

Afficher les obsolètes
Non navigable

AudioDeviceOutput accepts audio streams to be rendered out to physical hardware devices such as speakers or headphones. It provides a single Input pin that can be targeted by Wires. Any audio streams wired to an AudioDeviceOutput are heard.

Échantillons de code

Outputting Audio to Device

local audioPlayer : AudioPlayer = Instance.new("AudioPlayer")
audioPlayer.Parent = workspace
audioPlayer.AssetId = "rbxassetid://9112854440"
local deviceOutput = Instance.new("AudioDeviceOutput")
deviceOutput.Parent = workspace
local wire = Instance.new("Wire")
wire.Parent = workspace
wire.SourceInstance = audioPlayer
wire.TargetInstance = deviceOutput
audioPlayer:Play()

Résumé

Propriétés

  • Lecture parallèle

    A Player who is intended to hear the connected audio streams.

Propriétés

Player

Lecture parallèle

An optional Player who is intended to hear the connected audio streams. If left unspecified, the streams wired to this AudioDeviceOutput are heard by everyone.

Méthodes

GetConnectedWires

Paramètres

pin: string

Retours

Évènements