Difference between revisions of "Source"

Line 2: Line 2:
 
You can do interesting things with Sources, like set the volume, pitch, and its position relative to the listener.
 
You can do interesting things with Sources, like set the volume, pitch, and its position relative to the listener.
 
== Constructors ==
 
== Constructors ==
{{#ask: [[Category:Functions]] [[Constructs::Source]]
+
{{#ask: [[Category:Functions]] [[Constructs::Source]] [[Since::<071]]
 
| headers=hide
 
| headers=hide
 
| default=None.
 
| default=None.
Line 8: Line 8:
 
}}
 
}}
 
== Functions ==
 
== Functions ==
{{#ask: [[Category:Functions]] [[parent::Source]]
+
{{#ask: [[Category:Functions]] [[parent::Source]] [[Since::<071]]
 
| headers=hide
 
| headers=hide
 
| ?Description
 
| ?Description
 
}}
 
}}
{{#ask: [[Category:Functions]] [[parent::Object]]
+
{{#ask: [[Category:Functions]] [[parent::Object]] [[Since::<071]]
 
| headers=hide
 
| headers=hide
 
| ?Description
 
| ?Description
Line 23: Line 23:
 
{{#set:Description=A Source represents audio you can play back.
 
{{#set:Description=A Source represents audio you can play back.
 
}}
 
}}
 +
{{#set:Since=000}}
 
== Other Languages ==
 
== Other Languages ==
 
{{i18n|Source}}
 
{{i18n|Source}}

Revision as of 09:25, 25 March 2011

A Source represents audio you can play back. You can do interesting things with Sources, like set the volume, pitch, and its position relative to the listener.

Constructors

love.audio.newSourceCreates a new Source from a file, SoundData, or Decoder.

Functions

Source:getDirectionGets the direction of the Source.
Source:getPitchGets the current pitch of the Source.
Source:getPositionGets the position of the Source.
Source:getVelocityGets the velocity of the Source.
Source:getVolumeGets the current volume of the Source.
Source:isLoopingReturns whether the Source will loop.
Source:isPausedReturns whether the Source is paused.
Source:isStaticReturns whether the Source is static.
Source:isStoppedReturns whether the Source is stopped.
Source:pausePauses a source.
Source:playPlays a source.
Source:resumeResumes a paused source.
Source:rewindRewinds a source.
Source:setDirectionSets the direction of the Source.
Source:setLoopingSets whether the Source should loop.
Source:setPitchSets the pitch of the Source.
Source:setPositionSets the position of the Source.
Source:setVelocitySets the velocity of the Source.
Source:setVolumeSets the current volume of the Source.
Source:stopStops a source.
Object:typeGets the type of the object as a string.
Object:typeOfChecks whether an object is of a certain type.

Supertypes

Object

See Also


Other Languages