Difference between revisions of "Disk.playAudio"

From ComputerCraft Wiki
Jump to: navigation, search
m (Use type template)
 
(3 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
{{Function
 
{{Function
 
|name=disk.playAudio
 
|name=disk.playAudio
|args=[[string (type)|string]] side
+
|args={{Type|string}} side
 
|api=disk
 
|api=disk
 
|addon=ComputerCraft
 
|addon=ComputerCraft
 +
|desc=Starts playing the music record in the drive. If any record is already playing on any disk drive, it stops before the target drive starts playing. The record stops when it reaches the end of the track, when it is removed from the drive, when [[disk.stopAudio]] is called, or when another record is started.
 
|examples=
 
|examples=
 
{{Example
 
{{Example
 
|desc=Plays the audio found on the disk on the bottom drive (if any)
 
|desc=Plays the audio found on the disk on the bottom drive (if any)
|code=print(disk.playAudio("bottom"))
+
|code=disk.playAudio("bottom")
 
}}
 
}}
 
}}
 
}}
 +
 +
[[Category:API_Functions]]

Latest revision as of 19:12, 22 April 2013


Grid Redstone.png  Function disk.playAudio
Starts playing the music record in the drive. If any record is already playing on any disk drive, it stops before the target drive starts playing. The record stops when it reaches the end of the track, when it is removed from the drive, when disk.stopAudio is called, or when another record is started.
Syntax disk.playAudio(string side)
Returns nil
Part of ComputerCraft
API disk

Examples

Grid paper.png  Example
Plays the audio found on the disk on the bottom drive (if any)
Code
disk.playAudio("bottom")