SoundData:getSample

SoundData:getSample Gets the sample at the specified position. Valid indices start at 0 and go up to buffer length minus one. Non-integer indices are floored, which means the function does not do value interpolation of any kind. Function Synopsis sample = SoundData:getSample( i ) Arguments number i The position of the sample (0 means first sample). Values are not interpolated, so use whole numbers only. Returns number sample The normalized sample (range -1.0 to 1.0). See Also SoundData

SoundData:getSampleCount

SoundData:getSampleCount Available since LÖVE 0.9.0 This function is not supported in earlier versions. Returns the number of samples per channel of the SoundData. Function Synopsis count = SoundData:getSampleCount( ) Arguments None. Returns number count Total number of samples. See Also SoundData

SoundData:getSampleRate

SoundData:getSampleRate Returns the sample rate of the SoundData. Function Synopsis rate = SoundData:getSampleRate( ) Arguments None. Returns number rate Number of samples per second. See Also SoundData

SoundData:setSample

SoundData:setSample Sets the sample at the specified position. Function Synopsis SoundData:setSample( i, sample ) Arguments number i The position of the sample (0 means first sample). number sample A normalized sample (range -1.0 to 1.0). Returns Nothing. See Also SoundData

Source:clone

Source:clone Available since LÖVE 0.9.1 This function is not supported in earlier versions. Creates an identical copy of the Source in the stopped state. Static Sources will use significantly less memory and take much less time to be created if Source:clone is used to create them instead of love.audio.newSource, so this method should be preferred when making multiple Sources which play the same sound. Function Synopsis source = Source:clone( ) Arguments None. Returns Source source The n

Source:getAttenuationDistances

Source:getAttenuationDistances Available since LÖVE 0.9.0 It has been renamed from Source:getDistance. Gets the reference and maximum attenuation distances of the Source. The values, combined with the current DistanceModel, affect how the Source's volume attenuates based on distance from the listener. Function Synopsis ref, max = Source:getAttenuationDistances( ) Arguments None. Returns number ref The current reference attenuation distance. If the current DistanceModel is clamped, this i

Source:getChannels

Source:getChannels Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the number of channels in the Source. Only 1-channel (mono) Sources can use directional and positional effects. Function Synopsis channels = Source:getChannels( ) Arguments None. Returns number channels 1 for mono, 2 for stereo. See Also Source

Source:getCone

Source:getCone Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the Source's directional volume cones. Together with Source:setDirection, the cone angles allow for the Source's volume to vary depending on its direction. Function Synopsis innerAngle, outerAngle, outerVolume = Source:getCone( ) Arguments None. Returns number innerAngle The inner angle from the Source's direction, in radians. The Source will play at normal volume if the listener is inside

Source:getDirection

Source:getDirection Available since LÖVE 0.7.0 This function is not supported in earlier versions. Gets the direction of the Source. Function Synopsis x, y, z = Source:getDirection( ) Arguments None. Returns number x The X part of the direction vector. number y The Y part of the direction vector. number z The Z part of the direction vector. See Also Source

Source:getDistance

Source:getDistance Available since LÖVE 0.8.0 This function is not supported in earlier versions. Removed in LÖVE 0.9.0 It has been renamed to Source:getAttenuationDistances. Returns the reference and maximum distance of the source. There's a bug in 0.8.0 preventing this function from working Function Synopsis ref, max = Source:getDistance( ) Arguments None. Returns number ref The reference distance. number max The maximum distance. See Also Source